TSD code error?
Here is a section of TSD code(in all versions) insider Filter() to update
buy/sell decision variables using WPR filter:
if (Mode == FILTER_WPR) {
Value = iWPR(TradeSymbol, PeriodTrade, WilliamsP, 1);
if (Value < WilliamsH) okBuy = true;
if (Value > WilliamsL) okSell = true;
return ("iWPR: " + DoubleToStr(Value, 2));
}
where WilliamsH was set to -25, WilliamsL was set to -75.
This means if Value is between -25 & -75 then both okBuy & okSell will be
set to true. This doesn't seem to be right.
The right logic may look :
if (Value > WilliamsH) okSell = true
else if (Value < WilliamsL) okBuy = true;
Can someone verify that?
Thanks.
|