hi all,
its about BehgozinStrengthFinder and Linear Regression crossing. i make it as bar color. and added pivot point. below is the picture of last three days nifty 5 min.
put the chart of nifty future - that will be of more clarity and try to put the x axis also - do not try to hide it
this bar color will not repaintDo u have any doubt that the bar colors will be reapainted and what is meant by bar color repaint ? we only know that the signals are repainetd in a future looking indicators -like zig function.
_SECTION_BEGIN("BehgozinStrengthFinder");
CLN= Ref(C,0); why zero periods used here , why not back looking (Ref(C, -n) not used in place of Ref(C,0)
Beh=((CLN - EMA(CLN, 10)) / EMA(CLN, 10)) * 100;
V2 = HHV(Beh,100);
V3 = LLV(Beh,100);
Beh1= WMA(Beh*(V2-V3),6);
_SECTION_END();
_SECTION_BEGIN("Linear Regression");
P = Beh1;
Periods = Param("Periods", 15, 2, 300, 1, 10 );
_SECTION_END();
SetBarFillColor( IIf(Beh1 > LinearReg( P, Periods ) ,ColorRGB( 0, 100, 0 ),ColorRGB( 100,0,0 )));
SetChartOptions(0,chartShowDates);
SetChartBkColor( ParamColor("Color", ColorRGB( 105, 105, 105 ) ) );
GraphXSpace=Param("GraphXSpace",10,-100,100,1);
Plot(C,"Close",IIf(Beh1 > LinearReg( P, Periods ) ,ColorRGB( 0,255, 0 ),ColorRGB(255,0,5 )),styleCandle); here the candles will be generated but where r the vertical line generation
dtn=DateNum(); for intraday trading? or for any other purpose
haC=EMA((O+H+L+C)/4,3); haO=AMA(Ref(haC,-1),0.5);why Heiken ashi is used here?
haH=Max(H,Max(haC,haO)); haL=Min(L,Min(haC,haO));
_SECTION_BEGIN ("pivot");
bi = BarIndex ();
nbar = Param ("nbar", 7,2,50,1);
// Define fractals
PHigh = H> Ref (HHV (H, nbar), -1) AND Ref (HHV (H, nbar), nbar) <= H;
PHighPrice = ValueWhen (PHigh, H);
PLow = L <Ref (LLV (L, nbar), -1) AND Ref (LLV (L, nbar), nbar)>= L;
PLowPrice = ValueWhen (PLow, L);
ll = IIf (PLow AND PLowPrice <Ref (PLowPrice, -1), 1, 0);
hl = IIf (PLow AND PLowPrice>= Ref (PLowPrice, -1), 2, 0);
lh = IIf (PHigh AND PHighPrice <Ref (PHighPrice, -1), 3, 0);
hh = IIf (PHigh AND PHighPrice>= Ref (PHighPrice, -1), 4, 0);
combi = ll + hl + lh + hh;
t1 = ValueWhen (combi, combi, 1);
t2 = ValueWhen (combi, combi, 2);
t3 = ValueWhen (combi, combi, 3);
AA = ValueWhen (PLow, L, 2);
AABar = ValueWhen (PLow, bi, 2);
BB = ValueWhen (PHigh, H, 1);
BBBar = ValueWhen (PHigh, bi, 1);
CC = ValueWhen (PLow, L, 1);
CCBar = ValueWhen (PLow, bi, 1);
GraphXSpace = 5;
PlotShapes (shapeSmallCircle * PLow, colorBrightGreen, 0, L, -10);
PlotShapes (shapeSmallCircle * PHigh, colorRed, 0, H, 10);
_SECTION_END ();
dec = (Param("Decimals",2,0,7,1)/10)+1;
Title =EncodeColor(55)+ Title = Name() + " " + EncodeColor(32) + Date() +
" " + EncodeColor(5) + "{{INTERVAL}} " +
EncodeColor(55)+ " Open = "+ EncodeColor(52)+ WriteVal(O,dec) +
EncodeColor(55)+ " High = "+ EncodeColor(5) + WriteVal(H,dec) +
EncodeColor(55)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) +
EncodeColor(55)+ " Close = "+ EncodeColor(52)+ WriteVal(C,dec)+
EncodeColor(55)+ " Volume = "+ EncodeColor(52)+ WriteVal(V,1) ;
i am testing it about 1 month now on realtime market. about 70% time it give so accurate signal ( in flat market also ), but fail sometime badly (even in trend market). think it need more ideas to filter its false signal.
i tried nonlag macd on it... if u have any suggestion make it better, pls share it.
thank you all.