
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,
I'm looking to alternate buy orders and sell orders.
What I mean is;
First open by mean of an indicator is a buy (could be a sell of course) and then a buy order is open, if price bounce down to a level under the open price from the buy order, a sell order will open, but if price goes up again no new open buy should happen. Here a new buy order should only happen when price bounces back from the sell order. All the same if a sell order is the first to happen.
I've tried to get that with the following code but doesn't work.
I really appreciate if one could help me here.
best regards
Luis
Try coding with smaller functions. It makes life easier.
The above function returns the Order_Type of the last order within the Trade_Pool which also matches the Symbol provided.
-It does not exclude Pending Orders.
-It does not include all Symbols.
-It filters by magic# which is Extern Global [recommended].
-It does not sort orders by Time.
-It does not Print Fail_Messages or Error#.
-It does not Error_Handle | Retry | Send_Email ... Blah ... Blah ... Blah
Rename, customize or modify functions, but make extensive use of them. This one provided as sample only.
https://www.mql5.com/en/forum/139592
https://book.mql4.com/basics/functions
Try coding with smaller functions. It makes life easier.
The above function returns the Order_Type of the last order within the Trade_Pool which also matches the Symbol provided.
-It does not exclude Pending Orders.
-It does not include all Symbols.
-It filters by magic# which is global [recommended].
-It does not sort orders by Time.
-It does not Print Fail_Messages or Error#.
Rename, customize or modify functions, but make extensive use of them. This one provided as sample only.
Thank you for your advise ubzen. Regarding my issue o open alternate orders have any clue that could put me in the right direction?
Best Regards
Luis
Thank you for your advise ubzen. Regarding my issue o open alternate orders have any clue that could put me in the right direction?
Best Regards
Luis