this is what i've been using:
and it is succesfully count the number on Buy Limit with its current chart attached.
for example: i have 1 buylim on XAUUSD and 1 buylim on EURUSD. if i attach this EA on XAUUSD, it only count 1. if i attach this EA on GBPUSD, it count 0. so this code only count pending order on its current chart. how to count pending order on ALL symbols? or is this normal?
It is only counting pending Buy Limit orders not all pending orders... check your order types because it does work from other charts.
It is only counting pending Buy Limit orders not all pending orders... check your order types because it does work from other charts.
yes it is. i forget to clarify the question. it indeed only counts buy limit orders, i can edit that later. what i want to do is count buy limit for every symbols. but this code result is depending on the chart it is attached to.
so above example applies: let's say i have 1 buylim on XAUUSD and 1 buylim on EURUSD. if i attach this EA on XAUUSD, it only count 1. if i attach this EA on GBPUSD, it count 0. i want the result is 2, no matter what chart it is. so this code only count pending order on its current chart. in conclusion, it only count buy limit on the chart symbol EA is attached to, not all buy limit on all symbols
yes it is. i forget to clarify the question. it indeed only counts buy limit orders, i can edit that later. what i want to do is count buy limit for every symbols. but this code result is depending on the chart it is attached to.
so above example applies: let's say i have 1 buylim on XAUUSD and 1 buylim on EURUSD. if i attach this EA on XAUUSD, it only count 1. if i attach this EA on GBPUSD, it count 0. i want the result is 2, no matter what chart it is. so this code only count pending order on its current chart. in conclusion, it only count buy limit on the chart symbol EA is attached to, not all buy limit on all symbols
no, it works independent of chart symbol.
you either have different pending orders on those other charts or are not calling this function on all occassions.
remember a Buy Limit is different to a Buy Stop
use some print statements to identify the pending orders that it finds and counts.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
this is what i've been using:
and it is succesfully count the number on Buy Limit with its current chart attached.
for example: i have 1 buylim on XAUUSD and 1 buylim on EURUSD. if i attach this EA on XAUUSD, it only count 1. if i attach this EA on GBPUSD, it count 0. so this code only count pending order on its current chart. how to count pending order on ALL symbols? or is this normal?