
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
don't forget to fill in the OrderModify with details...as for now they are empty
Same error. Keeps importing values from other pairs. Even for the manually opened order.
there's got to be some other part of your code that's doing this...
Same error. Keeps importing values from other pairs. Even for the manually opened order.
When you say manually opened order, you mean a snippet of your code put into a new testing EA?
And do you run the original EA on a VPS? Make sure that is not running....
I think I would remove all charts except one, remove all indicators and even global variables on terminal, and then put your testing EA on that chart. So your test EA is the only one operating. Make your testing code as simple as possible, get it working and then expand it to include your other variables....you're looking for an "ah.." moment I think...
When you say manually opened order, you mean a snippet of your code put into a new testing EA?
And do you run the original EA on a VPS? Make sure that is not running....
I think I would remove all charts except one, remove all indicators and even global variables on terminal, and then put your testing EA on that chart. So your test EA is the only one operating. Make your testing code as simple as possible, get it working and then expand it to include your other variables....you're looking for an "ah.." moment I think...
I mean I hit the sell or buy button on the top left: that should mean that the Magic Number should be 0. So why would it even select it? If I have, after the OrderSelect
I'd apply a "scorched earth" approach here, rather than try to figure it out. Which is something I'd had to do many times, before an "of course!" moment...
Have a single chart open, remove everything. Place a manual order, even modify it manually. That must work ok?
Then, code an EA to modify the single order you've placed; this should only be a few lines of code. But hard code the values you want; magicnumber, symbol, period etc . don't rely on Symbol(), MIDMAGICMA etc.
If there's no errors then expand your code using your variables....then, add another order
try this one - not tested!
Nothing seems to fix this error unfortunately. I keep getting the same bug and it's frustrating. At this point this must be a source code bug. I tried everything
This selects all symbols with the proper magic number and all orders of the current chart symbol regardless of MN.
Don't use negative logic. Simplify your code.
Loops and Closing or Deleting Orders - MQL4 programming forum
For In First Out (FIFO rules-US brokers,) and you (potentially) process multiple orders per symbol, you must find the earliest order (count up,) close it, and on a successful operation, reprocess all positions.
CloseOrders by FIFO Rules - Strategy Tester - MQL4 programming forum - Page 2 #16
MetaTrader 5 platform beta build 2155: MQL5 scope, global Strategy Tester and built-in Virtual Hosting updates - Best Expert Advisors - General - MQL5 programming forum #1 № 11 ACCOUNT_FIFO_CLOSE
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
This selects all symbols with the proper magic number and all orders of the current chart regardless of the magic number. Don't use negative logic.
Don't use negative logic. Simplify your code.
Loops and Closing or Deleting Orders - MQL4 programming forum
For In First Out (FIFO rules-US brokers,) and you (potentially) process multiple orders per symbol, you must find the earliest order (count up,) close it, and on a successful operation, reprocess all positions.
CloseOrders by FIFO Rules - Strategy Tester - MQL4 programming forum - Page 2 #16
MetaTrader 5 platform beta build 2155: MQL5 scope, global Strategy Tester and built-in Virtual Hosting updates - Best Expert Advisors - General - MQL5 programming forum #1 № 11 ACCOUNT_FIFO_CLOSE
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
William Roeder, you might be my savior, so I edited the code in order to make it counting down. It now looks like this! Thanks for your precious help.
This selects all symbols with the proper magic number and all orders of the current chart symbol regardless of MN.
Don't use negative logic. Simplify your code.
Loops and Closing or Deleting Orders - MQL4 programming forum
For In First Out (FIFO rules-US brokers,) and you (potentially) process multiple orders per symbol, you must find the earliest order (count up,) close it, and on a successful operation, reprocess all positions.
CloseOrders by FIFO Rules - Strategy Tester - MQL4 programming forum - Page 2 #16
MetaTrader 5 platform beta build 2155: MQL5 scope, global Strategy Tester and built-in Virtual Hosting updates - Best Expert Advisors - General - MQL5 programming forum #1 № 11 ACCOUNT_FIFO_CLOSE
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
So my code is this right now but the problem seem persisting. I don't know what else to try. It keeps placing stop loss on another pair.
Print the chart symbol along with the ticket number, and you will find it's being modified somewhere else.