Renko EA: Premature order closure on Offline Charts
- 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 !!
Offline Charts are in MT4. Custom Charts are in MT5. This is the MT5 Forum. Which programming language are we dealing with, please?
In the absence of detailed information, it sounds like you are calling the current bar (brick) which is not fully formed, e.g., Close[0] or close[0].
Close[1] or close[1] will get you the last fully formed and closed bar (brick).
Please post your code if you want better help, or don't if you want to keep it private.
//--- store price, time, and volume data for access as in MQL4 #define SERIES(name,type) \ class C##name \ { \ public: \ type operator[](const int i){return i##name(NULL,0,i);} \ }name; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ SERIES(Open,double) SERIES(Low,double) SERIES(High,double) SERIES(Close,double) SERIES(Time,datetime) SERIES(Volume,long) SERIES(TickVolume,long)
