Vertical Scale metatrader 4

 

Is there any function in mql4 that allows me to read current price range from metatrader 4 vertical scale?


In the image below the actual price range is 15 points, I need a function that returns the current value of this range.

Files:
 
Evanio Martins:

In the image below the actual price range is 15 points...

I see 12 pips, from 0.97985 thru 0.98105, or what price range are you trying to capture?

 
Carlos Moreno Gonzalez #:

I see 12 pips, from 0.97985 thru 0.98105, or what price range are you trying to capture?


   You are right !!! 
 
William Roeder #:

Perhaps you should read the manual. Chart Price Max/Min - MQL4 programming forum (2017)
   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

 Thank you very much !!!
 
Carlos Moreno Gonzalez #:

I see 12 pips, from 0.97985 thru 0.98105, or what price range are you trying to capture?

I need to capture the range between 0.98105 and 0.98090 which is 0.00015 or 15 points
 
Evanio Martins #:
I need to capture the range between 0.98105 and 0.98090 which is 0.00015 or 15 points

But what is the rationale for that? Why do you need to capture that range? Depending on the scale you're using and the price range within that scale, the price between those two points next to each other is gonna change. What are you exactly trying to do? Maybe there's another way.

 
Evanio Martins #: I need the value of this range to insert in the calculation of opening prices of orders for my Expert. The value of the range varies as a function of time, but that's why I need to capture this value in real time.

Just use the equivalent of a Donchian Channel which is simply the Highest high and Lowest low for a certain period. Use the functions iHighest and iLowest.

iHigh

Returns High price value for the bar of specified symbol with timeframe and shift

iHighest

Returns the shift of the maximum value over a specific number of bars

iLow

Returns Low price value for the bar of indicated symbol with timeframe and shift

iLowest

Returns the shift of the lowest value over a specific number of bars

Reason: