I am new to this platform and trying to build an EA
-
I am trying to build an ea that repeats the last order which is only closed by SL and won't repeat the order if it is closed manually or by TP.
How many blocks will be needed for this?
-
Am I walking in the right path?
-
How about this one?
-
Not sure what you mean by 'repeat order'. Do you mean repeating the same open price? the same lot size? both?
-
yes, ea will repeat the same closed order with the same parameter that order had.
-
By repeat I meant, reopens the last closed order with the same open price, lot size etc only if it is closed by stoploss.
-
So far I got this : https://fxdreema.com/shared/t3GHTHHyd
If you go though the setting of "Trade Closed" block, you will understand what I am looking for.
But I haven't figured it out for the "pending order" block setting. How to set it in a way so that it will copy the exact same price, lot size, stoploss and takeprofit levels from the last closed order. -
@pressium Then you will need as many variables as info necessary for the next trade:
-
The EA will monitor all the open & pending orders on the current chart. And only reopens orders which are closed by stoploss. The newly open orders will have the same open price, lot size, stoploss and takeprofit just like the closed ones.
Will this EA be able to do that? https://fxdreema.com/shared/eQPb3Nnlc
-
@l-andorrà It is working... By the way, is there any way to limit/set the number of times each order will reopen?
-
Orders cannot be reopened once closed. Do you mean maybe opening a new order on the same open price a max number of times?
-
yes, opening a new order on the same open price a max number of times when it is closed by stoploss.
-
Do I need to add formula block?
-
Am I walking in the right direction?
https://fxdreema.com/shared/OlT6isZ5c -
You are in the good direction, yes. Just add a condition block before the buy pending block comparing the values of that variable and the input parameter. The variables' value needs to be below or equal to the input parameter's.
-
Is it ok? https://fxdreema.com/shared/Hxp3G9mSc
-
feel free to feel free

-
@Ultra525 What is that?
-
@pressium Correct.
-
@l-andorrà EA is not working.
Will you please check it? https://fxdreema.com/shared/lCWu0PRQc