[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ATR system buy price is yesterday ?



PureBytes Links

Trading Reference Links

Hello all,

I was looking at Steve Wiser's ATR Study available in the library 
section of the Amibroker site.

The code's comment says that the system buys and sells on the signal 
with a one day delay for both. However, I don't see how this is 
possible from the following code snippet:

ticker = 0.0;
Graph8 = HHV(H-ATRMultiplier*ATR(BuyATRPeriod),BuyOffset);
BuyStop = Ref(Graph8,-1)+ ticker;
BuyPrice = Max(BuyStop,Low);

It seems to me that the buystop is looking at yesterday's price. Or 
am I missing something ?

Thanks,
Hossam