EA opening multiple orders

 

assuming that im working with the basic macd EA template that is provided, how can I open up multiple orders?

right now, i can only open a buy/sell and then must close it before opening anything else.


i changed the top of the code from if(total<1) ... to if(total<10) assuming that this would allow 10 open trades - which it did - however this just left me with 10 copies of the same trade at the same time, essentially just making my trade 10 times larger.


thanks

 
You need to find something to mark that moment and save it in a global variable so you can avoid double trades or more. The common one is using the open time of the candle, so you'll never have another trade during that candle.
 
interesting. thank you, i think ill be able to work that out.
Reason: