|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Quote:
You´re right Deep But old versions have the same problem. I´ve tested with 195 and the same happens Pls, try this one and compare if all is ok. According with one explanation in MQL forum the best way to fix this is given a "if" condition to the calculus. So. We have: Code:
diff = iATR(NULL,0,KCPeriod,i)*KCFactor; std = iStdDev(NULL,0,BBPeriod,MODE_SMA,0,PRICE_CLOSE,i); bbs = BBDeviation * std / diff; and change by Code:
diff = iATR(NULL,0,KCPeriod,i)*KCFactor;
std = iStdDev(NULL,0,BBPeriod,MODE_SMA,0,PRICE_CLOSE,i);
if(diff>0) bbs = BBDeviation * std / diff;
__________________
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|