samusmus1:
Need coding help for simple martingale EA. I coded this. Anyone can lend a helping hand to make it work?
I need help with:
1. opening 20 martingale orders at this price:2. opening 20 martingale orders each [10] pips3. First order is buy, if (current price>Moving Average) else sell
4. Steps:
Entry:
1. EA should open 1 pending LIMIT buy (on price: entry_order1) and open 1 pending LIMIT sell order (on price: entry_order2).
2. If buy or sell order is filled, delete the other pending order. |
3. If SL is hit, then again, set 2 pending orders with double lotsize
4. if filled again, delete the other pending order etc
Exit:
5. close all orders if TP is hit. Reset lotsize back to 0.01 lotsize.
Need coding help for simple martingale EA. I coded this. Anyone can lend a helping hand to make it work?
I need help with:
1. opening 20 martingale orders at this price:
Code: Select all
Code: Select all
4. Steps:
Entry:
1. EA should open 1 pending LIMIT buy (on price: entry_order1) and open 1 pending LIMIT sell order (on price: entry_order2).
2. If buy or sell order is filled, delete the other pending order. |
3. If SL is hit, then again, set 2 pending orders with double lotsize
4. if filled again, delete the other pending order etc
Exit:
5. close all orders if TP is hit. Reset lotsize back to 0.01 lotsize.
beside the fact that martingale is gambling and a waste of time, you haven't coded any thing that will ever hopefully make sense. so don't title your posts like that.
EDIT : that link there is to another website, containing an attachment which is the code, didn't see it. still, a waste of time and also wrong forum. mql4 forum here

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 need help with:
1. opening 20 martingale orders at this price:
Code: Select all
Code: Select all
4. Steps:
Entry:
1. EA should open 1 pending LIMIT buy (on price: entry_order1) and open 1 pending LIMIT sell order (on price: entry_order2).
2. If buy or sell order is filled, delete the other pending order. |
3. If SL is hit, then again, set 2 pending orders with double lotsize
4. if filled again, delete the other pending order etc
Exit:
5. close all orders if TP is hit. Reset lotsize back to 0.01 lotsize.