You are absolutely correct. I apologize for the oversight in the trading logic. The previous script was indeed lacking the crucial OnTick() function or any timer function necessary for the Expert Advisor to periodically monitor trading conditions. It only contained the OnInit() , OpenSellOrder() , and OpenBuyOrder() functions.
I have since rectified this and updated the script to a new version, which I have now attached. This revised version incorporates the OnTick() function, which executes upon each price tick, enabling the EA to evaluate the Stochastic indicator's conditions and determine whether to initiate trade orders. Furthermore, I have implemented several modifications to the lot sizing and stop-loss mechanisms, as detailed in the description column.
Thank you for bringing this critical point to my attention and for your valuable input.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Stoch Cross EA – Buy Below 20, Sell Above 80 (H1):
A simple and effective Expert Advisor based on Stochastic Oscillator reversal signals on the H1 timeframe. Buy signals are triggered when %K crosses above %D below the 20 level. Sell signals are triggered when %K crosses below %D above the 80 level. Risk is calculated based on account balance. TP and optional SL levels are customizable.
Author: Frizt Yonif Yongly Lumbantoruan A Md