Forum

Proper (better) way to add an order - (MQL5)

Good morning, I have an EA that I created and have been using it for the past year but now I'm trying to make it "better" and one of the things that I need to do is find a better way to add orders. Today, I use the MqlTradeRequest and MqlTradeResult so I can add order, but by using that, sometimes a

Stack Overflow error

Hey, I have an EA that gets the Stack Overflow error if I don't put a Sleep of something like 1 second. I do have a loop that calls itself (something like an infinite loop) but I need to find a way to do this and not get the Stack Overflow error. The infine loop is something like this: My EA

Get information from "Options Board" - MQL5

Hello, I'd like to know if there's a way to get the information from the options board (get it from code). I'd like to get information like the option strike and volatility. Thanks Option board image (https://www.mql5.com/en/forum/153649)

Enter new order only when first is executed (filled)

Hey, I'm kinda of new in MQL5. I have a EA that buys one stock first (let's say PETR4) and then buys another one (let's say ABEV3). The only problem is that I can only order the second one when the first one is executed (not only placed). I used the MqlTradeResult .retcode to get the return number