Forums › ProRealTime English forum › ProOrder support › Sma / profit curve condition › Reply To: Sma / profit curve condition
05/08/2024 at 4:49 PM
#232498
There you go:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ProfitMA = average[20,0](StrategyProfit) Above = ProfitMA >= StrategyProfit Below = ProfitMA < StrategyProfit IF Not OnMarket THEN IF Below THEN BUY 1 CONTRACT AT MARKET ELSIF Above THEN SELLSHORT 1 CONTRACT AT MARKET ENDIF SET STOP pLOSS 50 SET TARGET pPROFIT 100 ENDIF // graph StrategyProfit coloured("Blue") graph ProfitMA coloured("Red") |
add the variables Above or Below to your entry conditions.