Hi,
I have been struggling with this for days, read the manual, etc. but nothing I do seems to make any difference so I have finally come to ask here if I am just confused over how ApplyStop actually works?
I am trying to use candle patterns from 'The Strat' as a system in Amibroker, 6.49.1. Specifically entry on a 3-1-2Up or 2Down-1-2Up week in conjunction with a 2Up day where the daily High, daily Close, and the weekly High are very near each other (within a fraction of the ATR (14)). This is working for entries.
I also need a volatile trailing stop at the previous day Low so have been trying to use applystop (% or points) BUT although it exits on the correct day, it always exits at the Open price from that day whereas I would like it to take the Stop Price ideally, or the Low if not, so the outcome is conservative. The settings I change do not seem to make a difference and I have read the manual over and over and searched forums, google, etc. I am still learning so I am assuming I have missed something but can't figure out what it is.
I am using end of day data from Norgate for the US.
I will put below the code aspects that the google searches and the manual have told me are relevant. The total code has all sorts of options in it so really long.
SetTradeDelays(1,0,1,1);
Buy = Open;
Sell = Open;
Short=Cover=0;
Sell = 0;
SUp_LastDay_L = TimeFrameGetPrice("L",inDaily,-1);
SUp_Stop = SUp_LastDay_L
SUp_StopPercentage = ((High - SUp_Stop) / High) * 100;
ApplyStop(stopTypeTrailing,stopModePercent,SUp_StopPercentage, ExitAtStop=1, Volatile=TRUE); // Scenario 1 in func ref.
my settings are:
Example outcome:
Another example:
Results:
i have also tried specifying sellprice but that didn't help either. Can any more knowledgeable people spot what I have obviously missed, or just let me know that taking the open on EoD data is just how applystop works?
Thanks for your time, James