OK. I have figured out exactly how the TS2000i's CCI Average was calculated. As I expected it is not a correct calculation. I will give a detailed discussion on that if any one is interested. I can show that using the 30 Min (20, 10) CCI cross over using the erroneous CCI Average indicator, is very similar to using CCI value cross over or below zero. However, since NPP prefer to use the flawed CCI Average for now, and we would like to get other issues moving. I have coded the "flawed" CCI Average into the strategy. NPP, please take a look to see if the automated trades would have agreed with your manual trades. (The only thing changed is the calculation of longCCIAvg and the addtion of a variable dummy_longCCI.
Nice work WW, i code things more simple and there are some little details different from mine, also may be the results are some little bucks different from mine, but that`s never an issue for me, i don`t look on every single $, the overall outcome is the point. And I have some rare holes in my data too... I did import to TS2000i, with added 20,-$ comm and stopsize 4 ticks here we go.. ww_nyc vers.
If you look for any explanation what`s going on in the markets here: May be we see some topping out, at major bottoms/tops you often find some heavy back and forth trading, we are possibly at the end of this longlasting uptrend, at least is this the opinion of many marketpartitions, every side is sqeezed out from the other, a real Bull/Bear fight. If you go back in charts you may find similar back and forth with large reversal days at other bottoms/tops. Michael
One remark to the code example from ww_nyc; I understood that the idea from NPP was to stop trading long for the day if stopped out of a long below the low of the previous day, and viceversa for a short. I think the current code stops trading at any time when the price is trading outside yesterdays range, and a position was closed. So maybe the code should look like: //Decide whether to call for the day - only if loss If (MP = 0 and MP[1] < 0 and (high[1] >= highd(1))) then begin doneshortfortheday = true; end; if (MP = 0 and MP[1] > 0 and (low[1] <= lowd(1))) then begin donelongfortheday = true; end;
Well, there is no definition if the last trade is stopped out, this is a tricky stuff, and what do you want exactly (I believe no much difference either...)? do you want the exitprice out of Y-range too or just the present price after stopped out...(uuh this details..) Here a definition i just coded, but not exactly defines a stopped out, only that the last trade was a loss (fine diffs..) Vars:NomoreL(0), NomoreS(0); if time = sess1firstbartime then begin NomoreL = 1; NomoreS = 1; end; If marketposition(1) < 0 and exitprice(1) > entryprice(1) and close > highd(1) then begin NomoreS = 0; end; If marketposition(1) > 0 and exitprice(1) < entryprice(1) and close < lowd(1)then begin NomoreL = 0; end; If conditionxyz and NomoreS = 1 then sell at ...... If conditionxyz and NomoreL = 1 then buy at ......
30 min CCI is in buy zone. Already have a crossover from yesterday. Low so far is 1305.00. If this bar doesn't go below it, I'll be going long at 8:40 CT. Stop loss will be 1304.75.
Low is below yesterday's low, so if stopped out in this next buy, then I'll be done with this method for today.