Need to hear your opinion on how 2 EA will affect each other if it's the same EA and magic number, only the direction is different
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,
I have a strategy that I want to separate between settings of long position and sell position. To simplify the process I will put a 2 same EA one with long position trade only and the other short position trade only. All the other parameter is the same including OpenPositionTicket[] to store ticket number and also the same magic number. The flow to open a position like snippet of the code below.
at the last of open position function above, I will store the order ticket to a PositionTicket variable (OpenPositionTicket[]). This OpenPositionTicket[] is exist both in LongPositionOnly EA and also in ShortPositionOnly EA. My question is if there's already a buy position ticket in LongPositionOnly EA and the next bar the ShortPositionOnly EA open a sell position does it will effect the OpenPositionTicket[] on the LongPositionOnly EA?
notes:
- there is no code in my EA to loop through all open position and select the symbol and magic number, so the problem of sell position ticket to write off or affecting the first long position ticket will never happen.
- since basically there's 2 variable to store the ticket in 2 different EA the possibility to create an error is small and this is the part where I want to hear your opinion.