I need help to plot Ribbon for this system according to its buy-sell signals.
Hope seniors might be able to help.
Code of RWI System
Thanx you in advance.
Waiting
Hope seniors might be able to help.
Code of RWI System
Code:
_SECTION_BEGIN("Background");
SetChartBkColor(ParamColor("Outer panel",colorBlack)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack));
tchoice=Param("Title Selection ",2,1,2,1);
_SECTION_END();
_SECTION_BEGIN("RWI");
minperiods = Param( "Min Periods", 9, 1, 200, 1 );
maxperiods = Param( "Max Periods", 40, 1, 200, 1 );
Uptrend = RWI(9,40) > RWILo(9,40) OR RWI(9,40) > MA(RWI(9,40),5);
downtrend = RWI(9,40) < RWILo(9,40)OR RWI(9,40) < MA(RWI(9,40),5);
Plot( RWI( minperiods, maxperiods) , _DEFAULT_NAME(),IIf( uptrend, colorBrightGreen, IIf( downtrend, colorRed, 0 )), ParamStyle("Style") );
Plot(0,"",colorYellow,styleLine);
_SECTION_END();
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( MA( P, 5 ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("RWILO");
minperiods = Param( "Min Periods", 9, 1, 200, 1 );
maxperiods = Param( "Max Periods", 40, 1, 200, 1 );
Uptrend = RWI(9,40) > RWILo(9,40) OR RWILo(9,40) < MA(RWI(9,40),5);
downtrend = RWI(9,40) < RWILo(9,40) OR RWILo(9,40) > MA(RWI(9,40),5);
Plot( RWILo( minperiods, maxperiods) , _DEFAULT_NAME(), IIf( uptrend, colorGold, IIf( downtrend, colorRed, 0 )), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("SIGNAL");
minperiods = Param( "Min Periods", 9, 1, 200, 1 );
maxperiods = Param( "Max Periods", 40, 1, 200, 1 );
Buy = RWI(minperiods, maxperiods) > RWILo(minperiods, maxperiods) AND RWI( minperiods, maxperiods) > 0;
Sell = RWI(minperiods, maxperiods) < RWILo(minperiods, maxperiods) AND RWI( minperiods, maxperiods) < 0;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
PlotShapes(shapeUpArrow * Buy, colorBlue, 0, RWILo( minperiods, maxperiods));
PlotShapes(shapeDownArrow * Sell, colorRed, 0, RWI( minperiods, maxperiods));
_SECTION_END();
Thanx you in advance.
Waiting