Median lines

#11
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

It is confusing for me.. kindly plot according 2 u (best suits to u)
 
#12
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

It was confusing in smaller timeframe like 15 min.. but when i went to daily timeframe. it is giving clear signals..

i want crossover system..


CONDITIONS -

1) WHEN YELLOW LINE CROSSES RED FROM TOP = "SELL"

2) WHEN YELLOW LINE CROSSES GREEN FROM BELOW = "BUY"

THANX YOU
 
Last edited:

sr114

Well-Known Member
#13
It was confusing in smaller timeframe like 15 min.. but when i went to daily timeframe. it is giving clear signals..

i want crossover system..


CONDITIONS -

1) WHEN YELLOW LINE CROSSES RED FROM TOP = "SELL"

2) WHEN YELLOW LINE CROSSES GREEN FROM BELOW = "BUY"

THANX YOU


acc to ur cond
[tf - daily)

rgds
subroto
 

sr114

Well-Known Member
#16
Hello sr114,

i didnt find any code for the above median line.

Kindly post the code.


thanx you


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",IIf(C>O, colorBrightGreen,colorRed),styleBar);

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

 //Plot(mH1,"MA Hi",colorGrey40,styleLine,styleThick);
 //Plot(ml1,"Ma Lo",colorGrey40,styleLine,styleThick); // if wished u can also plot the mas
 //Plot(MD1,"Median",colorYellow,styleLine);

 Buy=Cross(MD1,ml1);//(ml1,md1); // buy
 Sell=Cross(md1,mh1);//(mh1,md1); //sell

 Buy = ExRem(Buy, Sell);
 Sell = ExRem(Sell, Buy);

 //BuyPrice=ValueWhen(Buy,C,1); // L in place of C
 //SellPrice=ValueWhen(Sell,C,1); // H in place of C

 PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), 43, layer = 0,yposition = Low, offset = -20);
 PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), 4, layer = 0, yposition = High, offset = -20); //shapeSmallCircle
 
 Co = TimeFrameGetPrice( "C", inDaily, -1, expandFirst) ;
 Dates = DateTime();

 Title =EncodeColor(colorYellow)+"Shruti's Price PLOT [ by subroto ] "+"\n"+
 EncodeColor(colorWhite)+  Name () + "\n" +Date()+"  "+Interval(2)
 +EncodeColor(colorWhite)+ "\nOp : "+ 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 
 +EncodeColor(colorWhite)+ "\n\nLast day LTP : "+ NumToStr(Co,1.2)+"\n"
 +EncodeColor(colorWhite)+ "Close Diff : " + NumToStr((C -Co),1.2);

 _SECTION_END();
njoy price action
 
#18
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


Hello subroto,

i need buy-sell arrows with median lines. the code posted by you is without median lines...

Pls post the buy-sell arrow code with Median lines.

Thanx you
 

Similar threads