NexusFi: Find Your Edge


Home Menu

 





hand-picked trades on a chart's history bars


Discussion in Platforms and Indicators

Updated
    1. trending_up 2,401 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

hand-picked trades on a chart's history bars

  #1 (permalink)
 
andby's Avatar
 andby 
Norwich, UK
 
Experience: Intermediate
Platform: Multiple:research&executi
Broker: Started with Stage5/OEC ... multiple
Trading: Anything found profitable goes ...
Posts: 168 since Jul 2012
Thanks Given: 88
Thanks Received: 88

Hi all,

I would like to "manually/discretionary" place positions on a chart, on bars that already are part of the history data.

What is the use-case?
As a Multicharts user, I am not too happy with their market replay functionality which got left behind in terms of integration with some more exotic features MC has released. For example, while in play-back you cannot place trades on the chart.
Consequently, my way to practice off-line sim-trades is just by scrolling a chart back to its first page of bars, and progressing the chart bar by bar to the right. I usually place arrows to mark entry/exit points in the market, and I do scale out.
It would be great to have an indicator (let's say), that would read the arrows I place on the bars and issue entry/partial exit/exit decisions that I could later analyze in Multichart's performance report.
I'm not sure such an indicator exists, or whether a different solution exists.
Potential solutions I see? :
- Add the ability to place trades while in play-back
- Build such an indicator as described above (able to read some custom drawings and issue signals)
- Build some new custom orders that could be placed on history-data bars (for sim-trading purposes only, of course)

Any new ideas are welcomed.
Thx

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #3 (permalink)
 
andby's Avatar
 andby 
Norwich, UK
 
Experience: Intermediate
Platform: Multiple:research&executi
Broker: Started with Stage5/OEC ... multiple
Trading: Anything found profitable goes ...
Posts: 168 since Jul 2012
Thanks Given: 88
Thanks Received: 88


Code under:


Started this thread Reply With Quote
  #4 (permalink)
 
andby's Avatar
 andby 
Norwich, UK
 
Experience: Intermediate
Platform: Multiple:research&executi
Broker: Started with Stage5/OEC ... multiple
Trading: Anything found profitable goes ...
Posts: 168 since Jul 2012
Thanks Given: 88
Thanks Received: 88

hoolio,

Thanks for your feedback. Indeed, I was looking for such a tool myself, as I find the replay functions of various platforms were not giving me what I wanted.

Since you mentioned about a thread for this, there already is a (kind of) thread for this tool under:



I also copied this answer into this thread.

Time pressure is the main problem preventing me to further work on it. Still, whenever I'll have more time, or for anyone willing to contribute, I would like to enhance it with:

- Adding an automatic self-update whenever a new arrow / set of arrows (for a round-turn) appear on the chart.
- A stop-loss option to an entry order
- Scale-in option. Right now, it only supports scale out

thx!


hoolio - Wed, 18 Jun 2014 08:43:16 -0400
Andby,

It's a great tool.

Should you start a thread so we can develop this further.
Happy to chip in with any Easylanguage programming too but think you may be more advanced than me as I hadn't used the case function before.

I will be using your tool every day.

Question 1 - I take it in this version it's impossible to determine where within a bar the order was placed.
Most of my trading (discretionary) is on eg 2000 Ticks ES or 500 Ticks CL so there is room within in the bar to pick an entry or an exit. That is one thing I would love to be able to enhance your tool with.
At the moment, I think it just takes the bar close.
Could you eg - change the text from say "2" to represent two contracts to "2 - 1.0684" where 1.0684 was the exact price that you got in or exited on ?

Happy to participate in a thread.

H


Started this thread Reply With Quote
  #5 (permalink)
 hoolio 
Melbourne, Australia
 
Experience: Intermediate
Platform: NT8, Multicharts,Sierra
Broker: CQG, IB
Trading: YM,CL,GC,6E,6J
Posts: 97 since Mar 2013
Thanks Given: 85
Thanks Received: 60

Thanks for the reply Andby.

I was reading the list of new items in Multicharts 9.0 beta 1 and I noticed a new function:

Arw_Exist(ID).

It uses the ID number of the arrow.

I'm pretty sure we could use this for a simplification and evolution of your code and it would no longer need the switch/case stuff,

ie

use a variable say, value1

Set that variable to 1

If Arw_Exist(value1) then begin

[insert whatever code we like here such as using Arw_getbarnumber(value1) to get the bar number which we could then compare with currentbar and doing things with it such as buying/shorting etc]

then set value1 = value1 + 1

Once it iterates through the entire number of arrows it would end the code.

One thing I found with the switch/case ordering in your code was that it was not accepting stop or limit orders on the next bar. Perhaps it would also be easier to do the scaling in and stop loss orders without switch/case ??

If I get a chance, I'll knock together a beta and put it here for you to test Andby

Reply With Quote
  #6 (permalink)
 hoolio 
Melbourne, Australia
 
Experience: Intermediate
Platform: NT8, Multicharts,Sierra
Broker: CQG, IB
Trading: YM,CL,GC,6E,6J
Posts: 97 since Mar 2013
Thanks Given: 85
Thanks Received: 60

Hi Andby,

Turned out that new function Arw_Exist was not that useful for this purpose.

However, I turned instead to Multicharts "indicators or indicators" feature that is a workaround to avoid the switch/case method.

What I've done is the following:

1. Created an indicator leveraging some of your code called ArrowCatcher. This detects where the manual arrows are, their direction and also converts the text in the arrow into a numeric format. It outputs two plots - plot1 being the arrow direction (-1 for down arrow, 0 for no arrow or 1 for up arrow) and plot2 - being the numeric translation of the arrow text
2. A signal called ArrowSignals_NoScale that uses those Plots 1 and 2 to enter and exit trades WITHOUT scaling. It does have basic stops (stoploss/breakeven/profittarget/percenttrailing) included that the user can choose through the inputs.
NB in this version, the arrow text can either be inserted as blank, 0, 1 or 2. If blank or zero then the order is executed this bar on close. If 1, then a limit order the next bar using an ATR function to approximate half way along the next bar. If 2, then a stop order the next bar again using an ATR function to approximate half way along the next bar. [Obviously, this could be recoded to eg a few ticks above or below the last close]
3. A signal called ArrowSignals that again uses those Plots 1 and 2 to enter and exit trades WITH scaling - up to three tranches of scaling IN and OUT. It has the same basic stops. However, you should note that stoploss/breakeven can only be done on a position and not tranche basis in this code. Otherwise it was too complex and timeconsuming for this iteration of code.
NB in this version, the arrow text sets the size of the order and all orders are done at close of this bar. I have not set a maximum number of contracts for the entire position but that would be pretty easy to build into the code and you can also use the Multicharts signal properties I believe.

If you get a chance can you please test this Beta. I think it works but your mileage may vary

PS Whilst I don't know how to get the strategies to auto-recalculate I have assigned a keyboard shortcut to "Recalculate Strategy" to make it as easy as possible to do this manually

A word of thanks to a post by ABCTradingGroup that helped with my education on linking orders in Easylanguage.

Attached Files
Elite Membership required to download: 20140623_ArrowSignals.pla
Reply With Quote
Thanked by:
  #7 (permalink)
 
andby's Avatar
 andby 
Norwich, UK
 
Experience: Intermediate
Platform: Multiple:research&executi
Broker: Started with Stage5/OEC ... multiple
Trading: Anything found profitable goes ...
Posts: 168 since Jul 2012
Thanks Given: 88
Thanks Received: 88


hoolio View Post
Hi Andby,

Turned out that new function Arw_Exist was not that useful for this purpose.

However, I turned instead to Multicharts "indicators or indicators" feature that is a workaround to avoid the switch/case method.

What I've done is the following:

1. Created an indicator leveraging some of your code called ArrowCatcher. This detects where the manual arrows are, their direction and also converts the text in the arrow into a numeric format. It outputs two plots - plot1 being the arrow direction (-1 for down arrow, 0 for no arrow or 1 for up arrow) and plot2 - being the numeric translation of the arrow text
2. A signal called ArrowSignals_NoScale that uses those Plots 1 and 2 to enter and exit trades WITHOUT scaling. It does have basic stops (stoploss/breakeven/profittarget/percenttrailing) included that the user can choose through the inputs.
NB in this version, the arrow text can either be inserted as blank, 0, 1 or 2. If blank or zero then the order is executed this bar on close. If 1, then a limit order the next bar using an ATR function to approximate half way along the next bar. If 2, then a stop order the next bar again using an ATR function to approximate half way along the next bar. [Obviously, this could be recoded to eg a few ticks above or below the last close]
3. A signal called ArrowSignals that again uses those Plots 1 and 2 to enter and exit trades WITH scaling - up to three tranches of scaling IN and OUT. It has the same basic stops. However, you should note that stoploss/breakeven can only be done on a position and not tranche basis in this code. Otherwise it was too complex and timeconsuming for this iteration of code.
NB in this version, the arrow text sets the size of the order and all orders are done at close of this bar. I have not set a maximum number of contracts for the entire position but that would be pretty easy to build into the code and you can also use the Multicharts signal properties I believe.

If you get a chance can you please test this Beta. I think it works but your mileage may vary

PS Whilst I don't know how to get the strategies to auto-recalculate I have assigned a keyboard shortcut to "Recalculate Strategy" to make it as easy as possible to do this manually

A word of thanks to a post by ABCTradingGroup that helped with my education on linking orders in Easylanguage.

Hi Hoolio,

It's a good progress indeed, and thanks for picking this up
Whilst I'm hammered with some work and traveling non-stop for the moment, will test it soon.
Multicharts 9 beta 2 is out at the moment with some improvements/optimizations.

As another side project, I was also looking at a very good initiative ( QUSMA Data Management System : QUSMA) that presents a lot of potential if could be integrated with Multicharts in a way or another. I struggled to understand why most software houses out there, Multicharts included (except AmiBroker) run from integrating free minute/tick data sources (like the minute data from googlefinance).

cheers

Started this thread Reply With Quote




Last Updated on July 25, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts