Forum

How to calculate a MA for HA candles ?

Hi, I'm not able to find a solution for this, so I'm asking for help. I'm using Heikin-Ashi candles for my charts and I want to create a moving average line for the last 10 bars in the same way we can use iMA . So my HA indicator uses this call: iCustom( NULL, 0, "Heiken Ashi v2", 0, 0 ) how can

Checking Order Satus/State

Hello all, I'm want to monitor an order in a way so I can know when it changes from pending to open and from open to closed. I don't use price to check this because I must have sure that the order was hit, so I use ticket number ( Fractal_Buy [4] has the ticket number). if ( OrderSelect (

Logical expressions

Hello all, I'm curious about how MQL interprets logical expressions. If you check the code bellow you will see two "equivalent" expressions, but one is a normal expression, were I compare each element individually, on the second expression it looks like that MQL allows to compare all elements at

Problem Drawing Vertical Lines

Hello, I'm writing an indicator to draw vertical lines when condition one of the conditions are true. It's working ok on forward test, it will draw them when A and B is true, but as an indicator and since it has the routine to go back to previous bars it should also draw them but it doesn't, it

Lowest Value but for an indicator

Hello, How can I use the same logic I use for finding the lowest low value for the price but applied to the AO indicator? What I want is to find the lowest low value of the AO in a given period. For price value I use: AO_Lowest_Value = Low[Lowest(NULL, 0, MODE_LOW, bar_count, 0)]; Also if I have a

NormalizeDouble function

Hello, MQL rounds decimal numbers like 112.80 to 112.8 automatically (at least it looks like), but I need the value to be shown like 112.80 (with the zero), so I tried to use normalizedouble function with 2 digits (or 4 to the other pairs), but it only shows 1 digits when the last digit is a 0