In case of Bollinger band, in some cases I also got absurd values where upper value is smaller than lower value.
Below is the code I used for Bollinger Bands:
bbHandle = iBands(_Symbol, _Period, BB_Period, i, BB_Deviation, PRICE_CLOSE);
CopyBuffer(bbHandle, 0, 0, 3, iMABuffer);
bb_upper[i] = iMABuffer[1];
bb_lower[i] = iMABuffer[2];
Please suggest.
Regards
Vinayak
Hi,
I am using ADX indicator and the values I received at the time of execution of trade was 69 and 72 for 2 consecutive bars (increasing), while the values shown in tester for that trade was 62.5 and 58 (reducing).
I have observed the same for other indicators also (Bollinger bands, MACD, EMA etc). Because of this reason, I am getting trades where I don't expect and my strategy is failing every time.
For ADX, I used main value from buffer 0 and extracted 3 values from buffer 0 with shift 0. Below is the code:
adxHandle = iADX(_Symbol, _Period, ADX_Period);
CopyBuffer(adxHandle, 0, 0, 3, iMABuffer);
double adxValue[3];
adxValue[0] = iMABuffer[0];
adxValue[1] = iMABuffer[1];
adxValue[2] = iMABuffer[2];
Please suggest what could be the issue
.
Thanks
Vinayak.
adxHandle = iADX(_Symbol, _Period, ADX_Period);
double adxValue[3];
CopyBuffer(adxHandle, 0, 0, 3, adxValue);
im sure you can figure the rest out from here
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am using ADX indicator and the values I received at the time of execution of trade was 69 and 72 for 2 consecutive bars (increasing), while the values shown in tester for that trade was 62.5 and 58 (reducing).
I have observed the same for other indicators also (Bollinger bands, MACD, EMA etc). Because of this reason, I am getting trades where I don't expect and my strategy is failing every time.
For ADX, I used main value from buffer 0 and extracted 3 values from buffer 0 with shift 0. Below is the code:
adxHandle = iADX(_Symbol, _Period, ADX_Period);
CopyBuffer(adxHandle, 0, 0, 3, iMABuffer);
double adxValue[3];
adxValue[0] = iMABuffer[0];
adxValue[1] = iMABuffer[1];
adxValue[2] = iMABuffer[2];
Please suggest what could be the issue
.
Thanks
Vinayak.