Simple Coding Help - No Promise.

Hello all,

i need small help from seniors to plot exploration code ...

Details -

When Default Macd (12,26,9) crossover is above Zero line = Buy

When Default Macd (12,26,9) Crossover is below zero line = Sell

(Avoid buy crossover below zero line & same for avoid sell crossover above zero line)


Thanx you in advance.
 

amitrandive

Well-Known Member
Hello all,

i need small help from seniors to plot exploration code ...

Details -

When Default Macd (12,26,9) crossover is above Zero line = Buy

When Default Macd (12,26,9) Crossover is below zero line = Sell

(Avoid buy crossover below zero line & same for avoid sell crossover above zero line)


Thanx you in advance.
Try this

Code:
Buy = Cross( MACD(),Signal()) AND MACD()>0;
Sell= Cross(Signal(), MACD()) AND MACD()<0;
 

cellclinic

Well-Known Member
Hello Friends ...

I need a small help on rsi formulla attached ... in this it draws 20,40,50,60,80 levels along with the same color of rsi selected ... I need those lines colors to select mannually or if it could be by default 20-60 red dotted,thick ... 40 - 80 blue dotted , thick & 50 thick black or rsi line color ....

HTML:
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100);
periods = Param( "Periods", 14, 1, 200, 1 );
z = RSI( periods);

RSILineColor = ParamColor("RSI thick Color",ColorRGB(127,0,83));
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83));
RSIOversoldColor = ParamColor("RSI Oversold Color",colorRed);


Plot( z, _DEFAULT_NAME(), RSILineColor , styleThick  );
Plot( 40, _DEFAULT_NAME(), RSILineColor , styleThick|styleNoTitle  );
Plot( 80, _DEFAULT_NAME(), RSILineColor , styleThick|styleNoTitle  );
Plot( 60, _DEFAULT_NAME(), RSILineColor , styleThick|styleNoTitle  );
Plot( 20, _DEFAULT_NAME(), RSILineColor , styleThick|styleNoTitle  );
Plot( 50, _DEFAULT_NAME(), RSILineColor , styleThick|styleNoTitle  );
PlotOHLC(z,z,50,z,"",IIf(z>50,RSIOverboughtColor,RSIOversoldColor),styleCloud|styleClipMinMax,20,80);


_SECTION_END();
FROM >>>



TO >>>

 
Last edited:

cellclinic

Well-Known Member
Thanks Bro ...

I made following alterations to the code .... colors are changed but thick for 50 level still not appearing ...



HTML:
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100);
periods = Param( "Periods", 14, 1, 200, 1 );
z = RSI( periods);

RSILineColor = ParamColor("RSI thick Color",ColorRGB(127,0,83));
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83));
RSIOversoldColor = ParamColor("RSI Oversold Color",colorRed);


Plot( z, _DEFAULT_NAME(), RSILineColor , styleThick  );
Plot( 40, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 80, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 60, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 20, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 50, _DEFAULT_NAME(), ParamColor("col 3",colorBlack) , ParamStyle("sty 2",styleThick)|styleNoTitle );PlotOHLC(z,z,50,z,"",IIf(z>50,RSIOverboughtColor,RSIOversoldColor),styleCloud|styleClipMinMax,20,80);


_SECTION_END();

Hello ,
e.g
Plot( 40, _DEFAULT_NAME(), paramcolor("col 1",colorRed) , ParamStyle("sty 1",styleline)|styleNoTitle );

do this for rest of your levels
 

amitrandive

Well-Known Member
Thanks Bro ...

I made following alterations to the code .... colors are changed but thick for 50 level still not appearing ...



HTML:
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100);
periods = Param( "Periods", 14, 1, 200, 1 );
z = RSI( periods);

RSILineColor = ParamColor("RSI thick Color",ColorRGB(127,0,83));
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83));
RSIOversoldColor = ParamColor("RSI Oversold Color",colorRed);


Plot( z, _DEFAULT_NAME(), RSILineColor , styleThick  );
Plot( 40, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 80, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 60, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 20, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 50, _DEFAULT_NAME(), ParamColor("col 3",colorBlack) , ParamStyle("sty 2",styleThick)|styleNoTitle );PlotOHLC(z,z,50,z,"",IIf(z>50,RSIOverboughtColor,RSIOversoldColor),styleCloud|styleClipMinMax,20,80);


_SECTION_END();
You have chosen both thick and dashed from parameters.
Select only thick.


 

cellclinic

Well-Known Member
Thanks for replying Amit ...

Actually i need thick line only @ 50 level & others thick dashed ... So if i choose tick only then all switched to thick ...


You have chosen both thick and dashed from parameters.
Select only thick.


 

amitrandive

Well-Known Member
Thanks for replying Amit ...

Actually i need thick line only @ 50 level & others thick dashed ... So if i choose tick only then all switched to thick ...

Use this


Code:
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100);
periods = Param( "Periods", 14, 1, 200, 1 );
z = RSI( periods);

RSILineColor = ParamColor("RSI thick Color",ColorRGB(127,0,83));
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83));
RSIOversoldColor = ParamColor("RSI Oversold Color",colorRed);


Plot( z, _DEFAULT_NAME(), RSILineColor , styleThick  );
Plot( 40, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 80, _DEFAULT_NAME(), ParamColor("col 1",colorBlue) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 60, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot( 20, _DEFAULT_NAME(), ParamColor("col 2",colorRed) , ParamStyle("sty 2",styleDashed)|styleNoTitle );
Plot(50,_DEFAULT_NAME(), ParamColor("col 2",colorRed), styleLine|styleThick); 
PlotOHLC(z,z,50,z,"",IIf(z>50,RSIOverboughtColor,RSIOversoldColor),styleCloud|styleClipMinMax,20,80);

_SECTION_END();
 

Nehal_s143

Well-Known Member
Nifty fut after opening till 1.50 pm was stuck in very narrow range, in such condition most of the system will generate to many signals and mostly alll of them will fail

TSI trend line break out worked again today in extremely range bound market, today 2 signals for break out 1st did not worked out 2nd gave good fall....

I dont say its holy grail, but where most of the system fails tsi break out is generating very less signals and good signals

adult photo sharing
 

Similar threads