How to apply iEnvelopes on top of iCCI in mgl5

 
I'm creating a robot that uses the combination of iEnvelopes and iCCI indicators to mark trade, but my problem is how to make my iEnvelopes draw and pick it's prices from my Commodity channel indicator (iCCI ). So instead of getting prices like 5118.4 for instance on crash 500, it will pull it's prices from iCCI like 33.4. In my image you can see iEnvelopes two lines blue and red on the down window where my iCCI indicator is shown, so how can i do this in mql5
Files:
fx.jpg  48 kb
 

Is your question about on the Chart or in code?

If it is in code then ...

Use the iCCI() indicator handle as the applied price parameter for iEnvelopes() function.
int  iEnvelopes(
   string              symbol,            // symbol name
   ENUM_TIMEFRAMES     period,            // period
   int                 ma_period,         // period for the average line calculation
   int                 ma_shift,          // horizontal shift of the indicator
   ENUM_MA_METHOD      ma_method,         // type of smoothing
   ENUM_APPLIED_PRICE  applied_price,     // type of price or handle
   double              deviation          // deviation of boundaries from the midline (in percents)
   );
Parameters

applied_price

[in]  The price used. Can be any of the price constants ENUM_APPLIED_PRICE or a handle of another indicator.

 
Fernando Carreiro #:

Is your question about on the Chart or in code?

If it is in code then ...

Use the iCCI() indicator handle as the applied price parameter for iEnvelopes() function.
Parameters

applied_price

[in]  The price used. Can be any of the price constants ENUM_APPLIED_PRICE or a handle of another indicator.

In code
 
5000543585 #: In code
Then the answer has been given in my post!
 
Fernando Carreiro #:
Then the answer has been given in my post!

Thanks alot

Please do you know how to identify price levels using mql5 for iEnvelopes, like if Crash 500 actual price is 5139 it's price level may be something like 102

How can i get this price level in mql5
 
5000543585 #: Please do you know how to identify price levels using mql5 for iEnvelopes, like if Crash 500 actual price is 5139 it's price level may be something like 102How can i get this price level in mql5

If you are using Envelopes (moving average and deviation), on CCI, then I assume you mean CCI price level and not Envelope price levels.

However, for CCI there is is no such thing as a corresponding price level. CCI measures the difference in price between the current and the average.

What Is the Commodity Channel Index (CCI)? How To Calculate
What Is the Commodity Channel Index (CCI)? How To Calculate
  • www.investopedia.com
The Commodity Channel Index​ (CCI) is a momentum-based oscillator used to help determine when an investment vehicle is reaching a condition of being overbought or oversold. Developed by Donald Lambert, this technical indicator assesses price trend direction and strength, allowing traders to determine if they want to enter or exit a trade...
 
Fernando Carreiro #:

If you are using Envelopes (moving average and deviation), on CCI, then I assume you mean CCI price level and not Envelope price levels.

However, for CCI there is is no such thing as a corresponding price level. CCI measures the difference in price between the current and the average.

No i want the Envelope price levels as this particular envelope is not applied to my CCI or should i open a separate thread for the question
 
5000543585 #: No i want the Envelope price levels as this particular envelope is not applied to my CCI or should i open a separate thread for the question

Envelopes is just a moving average and a deviation, similar to Bollinger bands. You apply it to the price itself so there are no "levels".

 
Fernando Carreiro #:

Envelopes is just a moving average and a deviation, similar to Bollinger bands. You apply it to the price itself so there are no "levels".

Alright thanks
 
5000543585 #: Alright thanks
You are welcome!