Trying to call ArraySetAsSeries is also failing on both env_lower and env_upper.
ArraySetAsSeries(env_lower, true);
![Documentation on MQL5: Array Functions / ArraySetAsSeries Documentation on MQL5: Array Functions / ArraySetAsSeries](/i/community/logo_mql5_small.png)
Documentation on MQL5: Array Functions / ArraySetAsSeries
- www.mql5.com
Array Functions / ArraySetAsSeries - Documentation on MQL5
hi ryanleland
try this
double env_lower[]; int envelope_handle;
double env_upper[];
envelope_handle = iEnvelopes(_Symbol, PERIOD_M1, envelope_period, 0, MODE_LWMA, PRICE_MEDIAN, envelope_deviation);
CopyBuffer(envelope_handle,1,0,2,env_upper);
CopyBuffer(envelope_handle,0,0,2,env_lower);
ArraySetAsSeries(env_upper,true);
ArraySetAsSeries(env_lower,true);
Comment("upper: ", env_upper[1], " lower: ", env_lower[1]);
Thanks jelam! That helps.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hey all, I'm a total noob and just experimenting for now. Been playing with, and learning strategies, but I am having issues with using the envelopes indicator.
Given the following code, my upper and lower values are getting output as exactly the same. Any help would be really appreciated.