How are the “buy price” and “sell price” denoted as functions in TradeScript?
For eg.: I want to back test the following algorithm.
My buy expression is:
CLOSE>EMA(CLOSE,7) AND
EMA(CLOSE,7)>EMA(CLOSE,21)*1.001
RSI(CLOSE,14)<40
My sell expression is:
Buy price + 0.5% of buy price.
How do I code my sell expression?
you can define your sell signal based on buy signal generated like buy using SET in tradescript
example
SET A = (CLOSE>EMA(CLOSE,7) AND EMA(CLOSE,7)>EMA(CLOSE,21)*1.001) A*1.00.5
as logically with respect to tradescript but, % wise can not be define i think