Separate orders opened by different expert advisors.Separate orders for the same instrument but based on different timeframes.Separate orders originating from different strategies.When you automate your trading through MQL4, using a magic number is necessary to select which orders to work with. As your experience grows, you may increase the number of open orders or strategies that you are using at the same time. Why Use Magic Numbers?Īt the start of your trading journey, you probably deal with only one or few orders at a time. Of course, you could generate a different magic number for each order, but this wouldn't be helpful as you will see in the next section. The same magic number can be used in many orders. Basically, when you open an order in MetaTrader 4 using MQL4 code, you can associate the order to a number. It is important to be able to manage the different orders running under different strategies and that is why you need a magic number!Ī magic number is an identifier for the orders. When working with scripts, indicators, and expert advisors in MetaTrader 4, you may arrive to a stage where you manage many orders at the same time. A magic number is an identifier that you can assign to an order in MetaTrader 4 using the MQL4 language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |