if i remember correctly, my intention was that amibroker will check if current close is lower than close of 15 bars ago, and if so will exit 15 bars after "buy" signal.
my question concerns the "true" in the "applystop" command: i understand, if i am correct, that the "true" means the Amibroker exit according to some measure of volatility of the stock. If so - is there any meaning left to the "nbar" exit? do the 15 bars i chose differ than any other number, if "true" is chosen? and another question: when i put the stop order as written above, i get sell "n bar" orders. but if i choose "false", under the same two propositions, no exit is taken with the nbar stop. i can see on the chart numerous cases where a bought security's close is lower than the 15 periods close, and no stop order is being activated. what is wrong?
btw: the results of the above system are good. i just refuse to use a system i can't fully understand.
thanks a lot in advance.
thanks.
can you explain, then, how i get many "Nbar exits" under my formula when i include "true" in it, and none when i put "false" instead of "true"?
the formula is:
bars = IIf( Close < Ref( Close, -15), 15, 100000);
ApplyStop(stopTypeNBar, stopModeBars, bars, 2, True);
Your code is incorrect. ExitAtStop is 4th parameter, not 5th.
My reply was about ExitAtStop parameter, not about volatile.
There is huge difference between two, even though both can be "true" or "false", hence your original query was unclear. Please read the manual about ApplyStop
that describes what "volatile" does: http://www.amibroker.com/guide/afl/applystop.html
BTW: WriteIf returns single string (selected value), not what you assumed it does.