lets try it ... ( need your help )

amibrokerfans

Well-Known Member
#1
hi all,

here is the idea, i am working on these days. 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.



this bar color will not repaint
here is the code :

_SECTION_BEGIN("BehgozinStrengthFinder");
CLN= 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);

dtn=DateNum();
haC=EMA((O+H+L+C)/4,3); haO=AMA(Ref(haC,-1),0.5);
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.
 

sr114

Well-Known Member
#2
Amibrokerfans

recently gone thru some forex site and found an interesting meta indicators called stepMA and written by Igor. do u have any idea as the indi is very efficient to detect the trend ( as seen in those meta charts of forex pairs)

waiting for ur reply

regards sr
 
Last edited:

amibrokerfans

Well-Known Member
#3
Amibrokerfans

recently gone thru some forex site and found an interesting meta indicators called stepMA and written by Igor. do u have any idea as the indi is very efficient to detect the trend ( as seen in those meta charts of forex pairs)

waiting for ur reply

regards sr
hi sr114

ya there lots of version created by others after IGORAD also.it does not repaint, but the prob is its lagging. found one call "nonlagdot stepma" (based on nonlag ma)-still lagging. almost like supertrend.

btw pls if u have any suggestion my above idea, pls share.
 

sr114

Well-Known Member
#4
hi sr114

ya there lots of version created by others after IGORAD also.it does not repaint, but the prob is its lagging. found one call "nonlagdot stepma" (based on nonlag ma)-still lagging. almost like supertrend.

btw pls if u have any suggestion my above idea, pls share.
yes try to put this piv calc in ur analysis and see what are the result . also make this afl exclusively for eod analysis - as i think it will show better result
_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorGrey40));
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
_SECTION_END();

SetBarsRequired(sbrAll,sbrAll);
nbar = Param("nbar",4,2,50,1);

PHigh = H > Ref(HHV(H,nbar),-1) AND Ref(HHV(H,nbar),nbar) < H;
PHighPrice0 = ValueWhen(PHigh,H);
PHighPrice1 = IIf(PHighPrice0 AND BarsSince(PHigh) > nbar,PHighPrice0,Null);
PHighPrice2 = IIf(PHighPrice0 AND BarsSince(PHigh) <= nbar,PHighPrice0,Null);
PLow = L < Ref(LLV(L,nbar),-1) AND Ref(LLV(L,nbar),nbar) > L;
PLowPrice0 = ValueWhen(PLow,L);
PLowPrice1 = IIf(PLowPrice0 AND BarsSince(Plow) > nbar,PLowPrice0,Null);
PLowPrice2 = IIf(PLowPrice0 AND BarsSince(Plow) <= nbar,PLowPrice0,Null);

GraphXSpace = 5;
SetChartOptions(0, chartShowDates);
Plot(C,"\nLast",colorSkyblue,styleCandle);
PlotShapes(shapeSmallCircle*PLow,colorBrightGreen,0,L,-10);
PlotShapes(shapeSmallCircle*PHigh,colorRed,0,H,10);
PlotShapes(shapeUpArrow*PLow,colorBrightGreen,0,L,-25);
PlotShapes(shapeDownArrow*PHigh,colorRed,0,H,-25);

Plot(PHighPrice1,"\nPHighPrice",colorOrange,styleThick);
Plot(PHighPrice2,"",colorOrange,styleDots | styleNoLine);
Plot(PLowPrice1,"\nPLowPrice",colorBrightGreen,styleThick);
regards
sr
 
Last edited:

sr114

Well-Known Member
#5
Ami..fans

cud u translate the lagged or non lagged stepMA for us to ami version? its a request

http://www.educofin.com/index.html

have a look at the 1st chart and at the lower pane - is it possible to recreate the afl of hadelta. (hadelta=Haclose - Haopen) i cud not understand how to proceed.

sr
 
Last edited:

amibrokerfans

Well-Known Member
#6
thank you sr114

but, really i am out of idea now on. see its its like stop and reverse indi. may be if some next to non-lag (like any hybrid of rsi or stochastic ) can filter those false signal and make it for scalping trade, can it be better?
 

amibrokerfans

Well-Known Member
#7
Ami..fans

cud u translate the lagged or non lagged stepMA for us to ami version? its a request

http://www.educofin.com/index.html

have a look at the 1st chart and at the lower pane - is it possible to recreate the afl of hadelta. (hadelta=Haclose - Haopen) i cud not understand how to proceed.

sr
sorry i dont understand mt4 language much. just trying to learn it. hopefully some other can do it.
but hay do u have hadelta as a indi in any format? its look like usefull.
 

sr114

Well-Known Member
#8
thank you sr114

but, really i am out of idea now on. see its its like stop and reverse indi. may be if some next to non-lag (like any hybrid of rsi or stochastic ) can filter those false signal and make it for scalping trade, can it be better?

i dont think as any SAR - but going by the image its clear that it is able to get the reversal point very easily. may be due to the Heiken ashi concept

sr
 

Similar threads