Well, I got the check in for the next day price target by referencing
everything from the previous day. The only problem is my formula is
not really profitable.
// Only one open position at a time
SetOption("MaxOpenPositions", 1 );
// Optimization numbers
BuyATRPeriod = 5;//Optimize("BuyATRPeriod",5,1,5,1);
ATRFactor = 1.3;//Optimize("ATRFactor",1.3,0.5,1.5,.1);
// ATR formula
YesterdaysATR = Ref(Close,-1) - ATRFactor * Ref(ATR(BuyATRPeriod),-1);
// Target Prices
BuyPrice = YesterdaysATR;
SellPrice = Open;
// Check to see if it signalled
Buy = YesterdaysATR > Low;
Sell = 1;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);