Friends,
I am trying to build a strategy which should look to take profit based on 1.5X previous candle High (in case of short) and 1.5 X previous candle low (in case of long). How ever getting error (EXPECTED DOUBLE) with below code.
can any one please help trouble shoot
def entryPrice = entryPrice();
DEF stoploss = IF <short condition> THEN HIGH[1] ELSE LOW[1];
DEF target = if bearish then (close - (Stoploss *2)) else (close + (stoploss *2));
def targetPrice = if bearish then entryPrice - target else entryprice + target;
I am trying to build a strategy which should look to take profit based on 1.5X previous candle High (in case of short) and 1.5 X previous candle low (in case of long). How ever getting error (EXPECTED DOUBLE) with below code.
can any one please help trouble shoot
def entryPrice = entryPrice();
DEF stoploss = IF <short condition> THEN HIGH[1] ELSE LOW[1];
DEF target = if bearish then (close - (Stoploss *2)) else (close + (stoploss *2));
def targetPrice = if bearish then entryPrice - target else entryprice + target;