Need Tradescript code for below

SCRIP:NIFTYFUTURES
GO LONG WHEN

EMA(CLOSE,7) CROSS EMA(CLOSE,14)

EXIT LONG WHEN
#SIGNAL FAILS
EMA(CLOSE,14) CROSS EMA(CLOSE,7)
OR
#STOPloss
CURRENTPRICE<=BUYPRICE-10PTS
OR
#TARGET
CURRENT PRICE>=BUYPRICE+40PTS

As per the above condition

Long

CROSSOVER(EMA(CLOSE,7),EMA(CLOSE,14))

Exit Long

CROSSOVER(EMA(CLOSE,14),EMA(CLOSE,7))

it is not possible to write script based on buy price with tradescript

2 Likes

Thanks a lot for the answer, but how can i achieve this then ?

you can define some condition based on OHLC

as i am new to tradescript, can you give an example plz ?