Hello everybody,
Up until now I always used the “simplified creation”, but for this one I need your help with writing a more specific code:
To enter a long position the conditions are –
- The values of RSI (21) minus RSI (7) should be less than 7
2. RSI (21) is bigger than RSI (14)
3. RSI (14) is bigger than RSI (7)
Thank you
Assaf
Automated trading questions should be posted in the ProOrder forum section. Please try to write explicit title next time! Many thanks.
The below code should be ok, I have not tested:
rsi7=rsi[7]
rsi21=rsi[21]
rsi14=rsi[14]
//The values of RSI (21) minus RSI (7) should be less than 7
c1 = rsi21-rsi7<7
//RSI (21) is bigger than RSI (14)
c2 = rsi21>rsi14
//RSI (14) is bigger than RSI (7)
c3 = rsi14>rsi7
if c1 and c2 and c3 and not longonmarket then
buy 10 contracts at market
endif