Two ideas;
1. A small fix (it likely will not fix the issue),
but the OrdersTotal() for loop needs to be the other way around. The
issue is that if one order is closed OrdersTotal() is one less hence use
this;
for(i=OrdersTotal()-1;i>=0;i--){ // Never count up while closing orders etc. (when using OrdersTotal) (With thanks WHRoeder https://forum.mql4.com/26603#220124) | -1: array is 0 based
2. The
indicator uses MODE_TRADES. (ref
https://docs.mql4.com/trading/orderselect) which does not include closed
orders. I wonder if there is a bug in MT4 that excludes partially closed
positions from MODE_TRADES list.
It may be possible to change/extend the indicator to use MODE_HISTORY for partially closed orders.
3. Aha, I just found this; https://forum.mql4.com/44280
Hope
this gets you started. You may still need a programmer to fix it (mql5
website > hire some freelancer > usually quite cheap)
Thanks Roel13 for the advice, I will look into what you've suggested and get back if it does anything or not.
The indicator works for me on MT4 v765... Not sure if it's the amount of trades it may not be able to handle. Each position requires a stop-loss in order to calculate the amount at risk, and also when applied to the chart is just for that currency symbol (unless you've specified an order comment or magic number).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is anyone able to help and advise why this consolidated position indicator (from http://www.informedtrades.com/blogs/3d_fx/2492-consolidated-position-indicator-mt4.html) when a position is partially closed, does not include the remaining open position in the calculation? and if so, suggest what needs to be changed?
I had asked/posted on the developer's site, but have not heard back in months...
Thankyou in advance.