In this instance, I'm basically looking for an upper bollinger cross, and if the latest High crosses down, with a lookback period of 1, to take a short.
Then I'm checking myself to make sure that in FACT there was a cross from 1 bar ago to the most current 0 bar:
Print("High is "+High[0]+"Upper is: " +BollingerTripleState_V4NT8(numStdDev,period,narro w_Tick_Threashold,wide_Tick_Threashold,displayData ,myLines,shading,opacity).Upper[0]);
Print ("Previous high was "+High[1]+"Upper was: "+ BollingerTripleState_V4NT8(numStdDev,period,narrow _Tick_Threashold,wide_Tick_Threashold,displayData, myLines,shading,opacity).Upper[1]);
ExitLong((int)orderQuantity);
EnterShort((int)orderQuantity/2,"SUPER SHORT");
Print("SUPER SHORT ");
justEntered = true;
Print("Close = " + Close[0]);
Here is my printout:
High is 37.39 Upper is: 38.2656979107107
Previous high was 38.28 Upper was: 38.2479576975874
SUPER SHORT
Close = 36.61
One would think all is well, seemingly from previous high, to the most current high there was a cross down of upper bollinger band... Except that, look at that chart... The High before the entry, since it looks back at [0] was BELOW $37, and the one BEFORE that at [1] about $37.30; and Bollinger upper were well above $38, at about $38.35 and $38.40
Why would I be getting these values? While I wait for help, I'm going to look around myself, so let's see who gets there first!
Comment