Hello fellow programmers,
I am currently facing a logic error in my Renko EA software, and I would like to get an expert opinion on the execution loop.
The problem:
I run the Expert Advisor on a large (7000-point) offline chart using the central RSI TMA indicator. The Expert Advisor frequently executes "quick closes"—opening and closing a trade within seconds due to price fluctuations within the active range, before the candle actually closes.
Excerpt from the code:
Here's the logic I'm currently using to manage inputs:
bridges
// [Here put the lines for opening and closing trades - 5 to 10 lines only]
// [Example: If (Closing Price[0] > Minimum Range && Total Orders() == 0) ...]
Question:
How can I "secure" the execution of the deal correctly so that it only runs at the start of a new Renko unit and remains immune to price fluctuations within the unit until the unit is confirmed?
Any suggestions regarding the best IsNewBar app for offline graphing would be greatly appreciated.
Thank you in advance for any technical guidance.
- How to Close Half of a Position in MQL5
- [ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5.
- Renko charts Repaints !!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register