23.8 C
San Juan
Sunday, March 8, 2026

Easy methods to connect the Worth Vary indicator to your buying and selling robotic – Buying and selling Techniques – 12 February 2026


My shopper requested how one can connect the Worth Vary indicator to his buying and selling robotic. Certainly, this enables the usage of completely different Cease Loss and Take Revenue values, in addition to quite a lot of buying and selling logic.

Should you’re new to this highly effective indicator, you possibly can learn extra about it right here: Worth Vary Indicator – Keep updated with value actions.

You may also learn all about utilizing this indicator successfully right here: Buying and selling methods for the “Worth Vary MT5” indicator.

Let’s get again to attaching this indicator to your buying and selling robotic.

This is a short information on how one can connect the Worth Vary indicator to your buying and selling robotic

1. Place the Worth Vary indicator in the identical folder as your robotic.

2. When receiving the indicator deal with through the iCustom perform, specify the precise title of the indicator file (with out “.ex5“):

indiHandle = iCustom(_Symbol, _Period, “Worth Vary MT5”);

3. Within the case of a purchase sign, the buffer comprises the present bar’s low value. Equally, within the case of a promote sign, the buffer comprises the present bar’s excessive value. Subsequently, we have to examine whether or not the quantity within the buffer is the same as these costs. Since these are double numbers, they can’t be in contrast precisely; we have to use epsilon.

4. Get costs from the chart. We’d like the Low and Excessive costs of the identical bar from which we took the sign (the primary bar):

double barLow = iLow(_Symbol, _Period, 1);

double barHigh = iHigh(_Symbol, _Period, 1);

5. Set accuracy (epsilon). Let’s use _Point – the dimensions of 1 level (e.g., 0.00001). We contemplate numbers equal if the distinction between them is lower than half a degree.

double epsilon = _Point * 0.5;

6. Get knowledge from the primary bar (earlier closed):

if (CopyBuffer(indiHandle, 0, 1, 1, bufferBuy)

    return;

}

7. Put together values for checking the sign:

double buyValue = bufferBuy[0];

double sellValue = bufferSell[0];

8. Examine purchase (UpTrend). The indicator writes Low[i] to the buffer. Checking:

A) The worth shouldn’t be empty (DBL_MAX),

B) The worth within the buffer is nearly equal to the Low value.

bool isBuySignal = (buyValue

9. Examine promote (DownTrend). The indicator writes Excessive[i] to the buffer. Checking:

A) The worth shouldn’t be empty (DBL_MAX),

B) The worth within the buffer is nearly equal to the Excessive value.

bool isSellSignal = (sellValue

That’s it!

You need to use the Worth Vary indicator with out attaching it to your buying and selling robotic

Do not forget that the Worth Vary indicator has a really handy, customizable notification system for brand spanking new tendencies, help and resistance ranges, and value ranges on any buying and selling image and timeframe.

Good luck along with your buying and selling!

Vladimir Toropov

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles