Median lines

#1
Last edited:
#2
Someone gave hints to plot the afl its below :-

pls add it to formula....am just played with elh afl.....and taken it from there...

eh = MA(H,1);
el = MA(L,1);
Plot(eh,"",colorRed);
Plot(el,"",colorGreen);

Or you can edit formula ..Periods = Param("Periods", 15, 2, 300, 1, 10 );

add 0.5 to it as Periods = Param("Periods", 15, 2, 300, 0.5, 1, 10 );


Please help me


Thanxs again
 

johnnypareek

Well-Known Member
#4
Here it is

HTML:
GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
up=4969;
dn=4952;
//Plot(up,"UP Break",5,8);
//Plot(dn,"DN Break",4,8);

MedianPrice=(H+L)/2;
Plot (MA(H,1),"High",5,1);
Plot (MA(L,1),"Low",4,1);
Plot (MA(MedianPrice,3),"Mean",6,1);
_SECTION_END();
 

sr114

Well-Known Member
#5
Hello seniors,

I need help to Draw this Moving average between median lines.

Kindly help me...

Link given below

http://oi39.tinypic.com/287n040.jpg

Kindly help to Convert it in AFL for amibroker.

Big thanx you in advance.
is this u want?


code is
_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();

_SECTION_BEGIN("Shruti's Median afl");

Plot(C,"Close",colorWhite,styleBar);

mH1=MA(H,1);
mL1=MA(L,1);
MD1=MA(Median(C,3),3);

Plot(mH1,"MA Hi",colorRed,styleLine,styleThick);
Plot(ml1,"Ma Lo",colorBrightGreen,styleLine,styleThick);
Plot(MD1,"Median",colorYellow,styleLine);

Title =EncodeColor(colorYellow)+"Shruti's Median Price plot "+"\n"+
EncodeColor(colorWhite)+ Name () + "\n"
+EncodeColor(colorWhite)+ "Op : "+ EncodeColor(colorWhite)+ O + " | "
+EncodeColor(colorWhite)+ "Hi : "+ EncodeColor(colorWhite)+ H + " | "
+EncodeColor(colorWhite)+ "Lo : "+ EncodeColor(colorWhite)+ L + " | "
+EncodeColor(colorWhite)+ "Cls : "+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorGold))+ C
+EncodeColor(colorWhite)+ "\nVolume : " + EncodeColor(colorWhite)+ WriteVal(V,1.0)+ "\n\n"
+EncodeColor(colorWhite)+ "\nMA Hi : "+ EncodeColor(colorWhite)+ mh1 + " | "
+EncodeColor(colorWhite)+ "\nMa Lo : "+ EncodeColor(colorWhite)+ ml1 + " | "
+EncodeColor(colorWhite)+ "\nMedian : "+ EncodeColor(colorWhite)+ md1 ;

_SECTION_END();
rgds
subroto
 
Last edited:
#6
Here it is

HTML:
GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
up=4969;
dn=4952;
//Plot(up,"UP Break",5,8);
//Plot(dn,"DN Break",4,8);

MedianPrice=(H+L)/2;
Plot (MA(H,1),"High",5,1);
Plot (MA(L,1),"Low",4,1);
Plot (MA(MedianPrice,3),"Mean",6,1);
_SECTION_END();


Thanx you Johnny,

One more request..

I wish to change the colour of line which is Blue to White.. but when i went to Edit .. i didnt found any option for editing Colours.

Kindly help
 

sr114

Well-Known Member
#8
Yes, Subroto...

I needed this one only but help me to change the colour of blue line to White...

Thanx you friends..
Code:
 _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();

 _SECTION_BEGIN("Shruti's Median afl");

 Plot(C,"Close",colorWhite,styleBar);

 mH1=MA(H,1);
 mL1=MA(L,1);
 MD1=MA(Median(C,3),3);

 Plot(mH1,"MA Hi",colorRed,styleLine,styleThick);
 Plot(ml1,"Ma Lo",colorBrightGreen,styleLine,styleThick);
 Plot(MD1,"Median",colorYellow,styleLine); // [COLOR="Blue"][B]change the colorYellow to colorwhite and u will get what u want[/B][/COLOR]

 Title =EncodeColor(colorYellow)+"Shruti's Median Price plot "+"\n"+
 EncodeColor(colorWhite)+  Name () + "\n" 
 +EncodeColor(colorWhite)+ "Op : "+ EncodeColor(colorWhite)+ O + " | "
 +EncodeColor(colorWhite)+ "Hi : "+ EncodeColor(colorWhite)+ H + " | "
 +EncodeColor(colorWhite)+ "Lo : "+ EncodeColor(colorWhite)+ L + " | "
 +EncodeColor(colorWhite)+ "Cls : "+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorGold))+ C 
 +EncodeColor(colorWhite)+ "\nVolume : " + EncodeColor(colorWhite)+ WriteVal(V,1.0)+ "\n\n"
 +EncodeColor(colorWhite)+ "\nMA Hi : "+ EncodeColor(colorWhite)+ mh1 + " | "
 +EncodeColor(colorWhite)+ "\nMa Lo : "+ EncodeColor(colorWhite)+ ml1 + " | "
 +EncodeColor(colorWhite)+ "\nMedian : "+ EncodeColor(colorWhite)+ md1 ;

 _SECTION_END();
see the code portion in bold blue txt

rgds
subroto
 
#9
Thanx you Sr114 for the code..

Can you add BUY-SELL ARROW WITH EXPLORATION TO IT ????


CONDTIONS -



Now we zoom in this daily chart to see in dept,

http://i39.tinypic.com/287n040.png


Spot the blue line:

If it is near the red line, Should Signal "BUY".

If it is near the green line, Should Signal "SELL"

if the blue line is some where between the red and green lines, we recognize a sideway moving market.
(Provide some signal for sideways market)



This is, at least for me, one of the best and simplest ways to visualize market direction.




Waiting for your reply..
 

sr114

Well-Known Member
#10
Thanx you Sr114 for the code..

Can you also add Buy-sell arrows to it ???


CONDTIONS -



Now we zoom in this daily chart to see in dept,

http://i39.tinypic.com/287n040.png


Spot the blue line:

If it is near the red line, Should Signal "BUY".

If it is near the green line, Should Signal "SELL"

if the blue line is some where between the red and green lines, we recognize a sideway moving market.
(Provide some signal for sideways market)

This is, at least for me, one of the best and simplest ways to visualize market direction.
waiting for your reply..

If it is near the red line, Should Signal "BUY". - how much near or a crossover?

If it is near the green line, Should Signal "SELL" - how much near or a crossover?

or any other threshhold - means te diff between red line and blue line = 0.5 or <0.5

clearly define the conditions pls ?

rgds
subroto
 

Similar threads