Mathias Halen:
I was thinking of making a indicator that plats the comment of pending orders on those buy/sell Limit/stop lines.
Is there any way of finding pending orders?
im using this for something eleas but this only gives me trades that have been open
I was thinking of making a indicator that plats the comment of pending orders on those buy/sell Limit/stop lines.
Is there any way of finding pending orders?
im using this for something eleas but this only gives me trades that have been open
-
Can't modify comments.
Metaquotes language: OrderComment() is not able to be modified - Expert Advisors and Automated Trading - MQL5 programming forum 2013.08.10Not a good idea to use comments, brokers can change comments, including complete replacement.
-
for(int i=OrdersHistoryTotal() -1; i >= 0; i--){ if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)==true)
Your code is looking at history and will only find deleted pending orders and closed orders. Look at the order pool.
-
if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && UseMagicnumber)
If UseMagicnumber is false, you will find nothing. What you meant is … && (OrderMagicNumber()==MagicNumber || !UseMagicNumber) Note the enclosing parentheses. -
if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)==true)
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool). Code becomes self documenting when you use meaningful variable names, like bool isLongEnabled where as Long_Entry sounds like a trigger price or a ticket number and "if long entry" is an incomplete sentence.
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
I was thinking of making a indicator that plats the comment of pending orders on those buy/sell Limit/stop lines.
Is there any way of finding pending orders?
im using this for something eleas but this only gives me trades that have been open