Is this possible to implement from TOS to Tradovate?Custom indicator request
input signalOffsetFactor = 0.20;
def signalOffset = AvgTrueRange(high,close,low,9)*signalOffsetFactor;plot Data = hlc3;
def triggerSell = if(if(close[-1] < high, 1, 0) and (hlc3[-2] < close[-1] or hlc3[-3] < close[-1]), 1, 0);
def triggerBuy = if(if(close[-1] > low, 1, 0) and (hlc3[-2] > close[-1] or hlc3[-3] > close[-1]), 1, 0);
rec buySellSwitch = if(triggerSell, 1, if(tr
SBS.SetLineWeight(2);
SBS.AssignValueColor(if triggerSell then
if thirdbarclosed then
#UpPos
CreateColor(255, 0, 0) else
#UpNeg
CreateColor(255, 0, 0)
else if Triggerbuy then
#DnPos
CreateColor(0, 255, 0) else
#DnNeg
CreateColor(0, 255, 0));
-
That code above is missing some code and that's why it's not working in TOS.
This line is not complete: rec buySellSwitch = if(triggerSell, 1, if(tr
This line is not complete: SBS.AssignValueColor(if triggerSell then
They are both missing the rest of the code. There will be a closing ) and a ; at the end of the line and none of them are there.
I'll see if I can find it in TOS.
Rich Williams
Please sign in to leave a comment.
Comments
3 comments