Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1652
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
Hi all!
What is the easiest way to write (modify) an order in my simple Expert Advisor to delete Take Profit and Stop Loss in it when a certain condition occurs, the maximum is supposed to be no more than three orders in one direction (if that's important), order counting, as I understand it is used, should I write it up again? I am waiting for someone who cares.
Hi all!
What is the easiest way to write (modify) an order in my simple Expert Advisor to delete Take Profit and Stop Loss in it when a certain condition occurs, up to a maximum of three orders in one direction (if that's important), I assume the order count is used, should I write a new one? I am waiting for someone who cares.
Unfortunately, it's hard to understand how to use such code.
Tried to put a flag in 1 when opening a buy order, and a flag in 0 when closing it, and added the latter to the open condition. It didn't work)
It is strange, in fact the rule is broken: open if the flag==0. And it still opened at 1 on the same candle anyway.
Why so complicated?
Don't get clever. That's not what the question was about.
Show me how you did it.
It seems to be working, I've redone it like this. Now I will try it on the sell and see if they can be independent of each other
UPD
Phew, it worked) I did the same for sell, now they can open independently of each other and have different logic.
It seems to be working, I've redone it like this. Now I will try it on the sell and see if they can be independent of each other
UPD
Phew, design worked) I did the same for sell, now they can open independently and be accompanied by different logic.
Probably gets swiped when compiling))))
Probably gets swore at compilation))))
Right! A bit,"return value of 'OrderSend' should be checked AI (2).mq4 34 9"
Right! A little bit,"return value of 'OrderSend' should be checked AI (2).mq4 34 9"
Make it like this
Make it so!
Thank you!
Thank you!