How to open a new trade if existing one still active ?
-
By using Check Trade " no trade / if trade " .. in this scenario only can have one open trade
how can i open a second trade while the first trade still active under certain condition .. and the maximum active trade will be two only
ex. No trade has " buy now and sell now " .. EA based on conditions trigger the "buy now" and now i have one active trade .. after few hours the "buy now" is still active but conditions of "buy now OR sell now" is matched but because of "no trade" i can't open a second trade
how can i let the "NO TRADE" open the second trade while first trade still active ... and no way to open a third trade till one of these open trades closed BASED on "If Trade"
-
@saeed-2 you can use the "group" and you have to handle them separately for each strategy

-
so i need two " NO TRADE " and one " IF TRADE "
First " no trade " will be group (1) and all ( buy now and sell now ) is group (1)
Second " no trade " will be group (2) and all ( buy now and sell now ) is group (2)
IF trade .. no need to assign group (1) and group (2)
correct ?
thanks for your quick reply and assistance
-
@saeed-2 it is not correct, also the "if trade" block must recognize the trades by group number.
Anyway, may be that we are complicating things, what is your strategy? if you have only one strategy that repeats you can use "ounces per bar" block. -
so by using once per bar the connections between blocks will be like this .. correct ? Maximum times to pass ( 2 ) because i need only two active trades
also a question sir .. i want to specify 12 pair currency only .. each with different parameters .. so in this scenario two things i need to follow:
- If trade / buy now & sell now / no trade .. Symbol mode ( specified ) and i fill in the specified symbol ( lets say EURUSD )
Note ... if the account is standard and using "m" like EURUSDm .... if i specified in symbol (EURUSD) the EA will recognize the pair ? or i need to add "m" ?
- i need to have 12 different structure combination connection same as the attached picture .. each with different parameters and specified symbol ?
Note .... Group # ... since i will have 12 difference structure and each with specified symbol .. do i need to have 24 Group# in total since each structure needs two .. or since each structure is specified by certain symbol i can use only group# (1) and group #(2) ?
thanks a lot for your time and assistance again .. appreciated
-
@saeed-2 said in How to open a new trade if existing one still active ?:
so by using once per bar the connections between blocks will be like this .. correct ? Maximum times to pass ( 2 ) because i need only two active trades
If you put one per candle and specify passes 2 times, he puts two orders on the same candle, and then another two on another candle if the condition is met. Is that what you want?
also a question sir .. i want to specify 12 pair currency only .. each with different parameters .. so in this scenario two things i need to follow:
- If trade / buy now & sell now / no trade .. Symbol mode ( specified ) and i fill in the specified symbol ( lets say EURUSD )
Note ... if the account is standard and using "m" like EURUSDm .... if i specified in symbol (EURUSD) the EA will recognize the pair ? or i need to add "m" ?
I don't know, just try
- i need to have 12 different structure combination connection same as the attached picture .. each with different parameters and specified symbol ?
Note .... Group # ... since i will have 12 difference structure and each with specified symbol .. do i need to have 24 Group# in total since each structure needs two .. or since each structure is specified by certain symbol i can use only group# (1) and group #(2) ?
I've never worked on multipairs, I think there are some blocks to simplify the project like "set current market" or something like that
-
@ambrogio said in How to open a new trade if existing one still active ?:
If you put one per candle and specify passes 2 times, he puts two orders on the same candle, and then another two on another candle if the condition is met. Is that what you want? no , what i want is to have a maximum open trade (2) for specify symbol ... lets say conditions met to buy for "EURUSD" .. the trade is active foe couple of hours and suddenly the trend reverse and sell conditions met .. so i need EA to open a sell trade .. in this scenario i need only maximum two open trades and don't want to open anymore unless one of these closed ..
it could be the opposite .. buy trade EURUSD is active for couple of hours and conditions met again to open another buy trade EURUSD ... so here i have two buy trades and i don't want to have any more trades till one of them closed.
i guess if i remove "once per bar" for attached picture .. i can have only two trades and it will work .. i will try when market opens
regarding specify the pair currency .. can i use " symbol specified " at "NO TRADe" ? or i have to use "set current market" ?
thanks a lot for your time and assistance
-
@saeed-2 please, can you share your project?
-
@ambrogio shared/8ADleW5Mb
what im trying is to have this concept :
here i have group 1 2 3 4 .. when EA start operating .. when any of these conditions met .. EA will open a ( only one )trade ..
- IF first trade still open and conditions met for any of them .. second trade will open .. so now i will have two open trades
*IF first and second trades are "same" type "buy buy or sell sell " AND both of them still active AND conditions met for remaining groups .. third trade will open as opposite type " if first second active trades are buy .. the third one will sell if conditions met.
IF first trade is buy type and second trade is sell trade .. EA will not open any new trades until one of opened trades closed
please check the attached file and try to assist me .. thanks a lot for your time and assistance
-
@saeed-2 Oh this kind of things are a little complicated for me, sorry
, maybe someone like andorrà or roar definitely solves it. -
i just finished this correlation .. i will check if it works

see its like that ..
- current market >> EURUSD
- once per bar >> 1
- check trades count >> less than 3
each with different parameters and conditions
i have one more question .... regarding trailing stop (stop loss ) >> i need to apply this concept >> if equity % is less than 20%, soft stop loss will be adjusted to another far pips ..
example .. initial SL = 80 pips ... equity % less than 20% .. when price hit initial SL .. trailing stop will shift the SL to 160 pips from open price distance
how can i apply it ?
thanks a lot sir for your assistance and time .. you helped me a lot in this discussion .. thanks
-
-
@saeed-2 Can you please share the link to your project?
-
sorry for late reply sir, i found it and its working now
thanks a lot for your time and assistance
-
@saeed-2 You are welcome.
