Any suggestions? (getting "No such function: TrailingStopLX" ) ?!
I get way too many AddOrder results, which is not a problem (yet) but when I add a SELL to CLOSE criteria, NONE of the previously visible BUY_TO_OPEN addOrders appear on the chart any more? I would have expected a bad sell_to_close logic to only remove CLOSE orders not the OPEN orders as well?
So I was using EntryPrice() and the commented out line #def trailing stop.
And when I discovered TrailingTopLX in TOS help, I thought I had SUCCESS. No such luck. "No such function"
input stopLossPercent = 0.25;
input pctCreep = 1.005;
input orderCost = 99.99;
def orderSize = orderCost/price;
def entry = EntryPrice();
def highestSinceEntry = if IsNaN(entry[1]) then close else Max(high, highestSinceEntry[1]);
#def trailingStop = highestSinceEntry * (1 - stopLossPercent);
def whatzit = TrailingStopLX(price, highestSinceEntry * (1 - stopLossPercent), 0);
I get way too many AddOrder results, which is not a problem (yet) but when I add a SELL to CLOSE criteria, NONE of the previously visible BUY_TO_OPEN addOrders appear on the chart any more? I would have expected a bad sell_to_close logic to only remove CLOSE orders not the OPEN orders as well?
So I was using EntryPrice() and the commented out line #def trailing stop.
And when I discovered TrailingTopLX in TOS help, I thought I had SUCCESS. No such luck. "No such function"
input stopLossPercent = 0.25;
input pctCreep = 1.005;
input orderCost = 99.99;
def orderSize = orderCost/price;
def entry = EntryPrice();
def highestSinceEntry = if IsNaN(entry[1]) then close else Max(high, highestSinceEntry[1]);
#def trailingStop = highestSinceEntry * (1 - stopLossPercent);
def whatzit = TrailingStopLX(price, highestSinceEntry * (1 - stopLossPercent), 0);