cuts price

 


hello, I'm trying to code the buy condition when the k line in stochastic rsi cuts upwards by 20. but I couldn't create the formula correctly. Can you review it?



else if(CountOpenedPositions("sell")!=0 && 

     (signal == "buy" || 
     ((InpKPeriod(0) < 20.0 and InpKPeriod(1) > 20.0 )) {CloseAllOrders("sell"); Comment("Closed By stochastic");}
     
 

Merhaba,

1. Lütfen kodları düzgün girin - araç çubuğundaki düğmeyi kullanın.

2. Bu örneği kontrol edin - https://www.mql5.com/tr/code/11634

Genie Stochastic RSI
Genie Stochastic RSI
  • www.mql5.com
Stochastic RSI Expert Advisor.
Neden: