Previous Next

GBar.Low()

Returns the lowest price of a candle.

double  GBar.Low(
   int              shift,                     // Offset
   ENUM_TIMEFRAMES  timeFrame = PERIOD_CURRENT // Timeframe of the value
);

Parameter

shift

[in]  The shift of the candle. 0 (zero) is the current, not yet completed candle.

timeFrame

[in]  The timeframe of the candle.

Return Value

Returns the low price of a candle.


Example:

//--- Include Glib classes
#include <Glib.mqh>

//--- Create pointer to an empty class object
GBar *bar;


int OnInit ()
{
   //--- Assign the class to the empty class object
   bar = gBar();

   return(INIT_SUCCEEDED);
}

void OnDeinit (const int reason)
{
   //--- Release memory on exit
   delete bar;
}


void OnTick ()
{
   //--- Output the lowest price of the last bar
   Print( bar.Low(1) );
}


See also

GBar.High, GBar.Open, GBar.Close