Hey everyone!
I am new to Tradovate and am coming over from TOS. I have an engulfing indicator that was very helpful in visualizing when engulfing bars appeared and I was hoping someone may be able to assist in converting it to javascript/Tradovate language.
#CANDLE CHARACTERISTICS
def UpperWick = high - Max(open, close);
def LowerWick = Min(open, close) - low;
def CandleBody = AbsValue(open - close);
def TotalCandle = AbsValue(high - low);
def Green = Close > Open;
def Red = Close < Open;
def EngulfingBullish = CandleBody > TotalCandle[1] and Open <= Close[1] and Green and Red[1];
def EngulfingBearish = CandleBody > TotalCandle[1] and Open >= Close[1] and Red and Green[1];
plot Bullish = EngulfingBullish;
plot Bearish = EngulfingBearish;
Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Bullish.SetDefaultColor(GetColor(8));
Bullish.SetLineWeight(2);
Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Bearish.SetDefaultColor(GetColor(8));
Bearish.SetLineWeight(2);
Thank you for any help with this!!