OrderSelect returns a bool, not a ticket number.
Error 4501 ? Are you sure, this error doesn't exist in documentation.
angevoyageur: Error 4501 ? Are you sure, this error doesn't exist in documentation. |
Appears only here GlobalVariableSetOnCondition - MQL4 Documentation |
ERR_GLOBALVARIABLE_NOT_FOUND (4501)
I guess just looking like this.. where you declare:
int ModTicket=OrderSelect(Ticket,SELECT_BY_TICKET);
You should re-declare afterwards where you do it on the second if:
// Replace: ModTicket=OrderSelect(Ticket,SELECT_BY_TICKET); int ModTicket=OrderSelect(Ticket,SELECT_BY_TICKET);
WHRoeder:
angevoyageur: Error 4501 ? Are you sure, this error doesn't exist in documentation. | Appears only here GlobalVariableSetOnCondition - MQL4 Documentation |
Ah, I missed that.
Thank you.
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
In my EA, I am placing a pending stop order to enter based on indicator criteria.
If after placing the pending order, price moves against me, I want to modify my pending entry price to the high/low (depending on Long/Short) of the last bar.
I am getting errors 4108 and 4501 and can't figure out why.
Can someone look at my code for my order modification and let me know what I am doing wrong? Thank You