A buy and sell now at the same time
-
Hello all,
I have kind of a stupid question, how can you make a EA for mt5 that triggers a buy and sell at the same time when conditions are met? I spend the whole evening trying all kind of blocks but none seems to work.
Has anyone ideas?
My idea is to look how a strategy would perform if you had a long and a short on when certain condition are met and let 1 of them run with a PT or trailing stop.
Thanks in advance
-
@bertkuiper just connect "buy now" and "sell now" together, doesnt matter which one is first.
From a theoritical perspective, though - your net position is still 0 so its kinda useless trade, youre only giving commissions to your broker.
-
Thanks for your reply
I tried that already, I put a simple condition like 2 EMA's crossover as a condition and then a buy and sell to that condition. Also when that didn't work I put the sell under the buy which was connected to the condition and that also didn't work. I also tried copying the condition to make a new set with same condition but sell instead of buy block under it but no succes either
-
@roar also in theory if you put a larger PT than SL for both the buy and sell order you could make profit. That's what I want to test
-
@bertkuiper what do you mean it didnt work? No trades at all?
Do you have netting or hedging account? That should be written in the top title of your mt5 window
-
@roar i tried backtesting it on demo and only 1 of both gets active
A hedge account so that should not be the issue
-
@roar I finally figured out the problem, I had my demo balance on 1000$ that for some reason thats to low to put on 2 orders. Indeed when I change the balance higher the condition block with the buy and sell order attached worked.
Thanks a lot for your help

-
@bertkuiper is that strategy profitable ?..
I am too trying same . But my ea is not opening at same time .pls reply