Forum

Speed up my code

I have an imaginary code - First question : I have to get just "bid" and "ask" value for each tick, it's faster with the "MqlTick" structure, or "SymbolInfoDouble" ? Second question : I have (for example) 3 indicator : a moving average "MA" - an average true range "ATR" - an average directional

Optimization problem

I have an EA that have 3 Moving Average , called MA_1, MA_2, MA_3. My question is: I have to optimize juts the period of the 3 MA, such that MA_1 goes from 3 to 100, MA_2 goes form 4 to 100, MA_3 goes form 3 to 100, but I need to avoid the calculation of all the result that have MA_1>MA_2 &&