covert into ribbon

#1
Dear Friends,

Anybody please convert this afl into Ribbon format. please help me friends

_SECTION_BEGIN("Price");
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 )) ));

trendup = IIf(MACD(12,26) > 0 AND MACD(12,26) > Signal(12,26,9), colorGreen, colorWhite);
trendcolor = IIf(MACD(12,26) < 0 AND MACD(12,26) < Signal(12,26,9), colorRed, trendup);
Plot( C, "Close", trendcolor, styleBar | styleThick );

//RSIup = RSI(7) > 70;
//RSIdown = RSI(7) < 30;

sp = Param( "RSI Period", 14, 1, 100 );
r = RSI( sp );
RSIup = r > 70;
RSIdown = r < 30;

shape = RSIup * shapeNone + RSIdown * shapeNone;
PlotShapes(shape, IIf( RSIup, colorBrightGreen, colorRed ), 0, IIf( RSIup, Low, High ) );

_SECTION_END();

SetChartBkColor(ParamColor("Panel color ",colorBlack));

PlotOHLC( Open, High, Low, Close, "", colorLime, styleBar| styleThick );
 
#2
hi
the code you posted is evolved from concept by markus,(Rockwell trading)a senior trader.
he uses RANGE BARS. Setting of rangebar i 10 to 12% of daily ADR over 5 days. ADR is avrage daiuly range ,daily range = high - low on that day.

He uses bollinger bands 12-2,Macd,Rsi(7).

THE BAR COLOR IS FROM MACD.
when macd>0 and macd>signal, bar gets green color
if macd<0 and macd<signal, bar gets red color

when RSI(7)>70,YOU GET BUY GREEN ARROWS UP
when RSI(7)<30,YOU GET SELL RED COLOR DOWN ARROWS
When upper bband(12,2) starts rising,it is uptrend.
when lower bband starts falling it is downtrend.

Bar color by MACD, ARROW COLOR BY RSI(7).
WHAT RIBBON YOU WANT FROM WHICH PART?
 
#3
Thanks Sir,

i got the modification from Johnny sir

_SECTION_BEGIN("Price");
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 )) ));

trendup = IIf(MACD(12,26) > 0 AND MACD(12,26) > Signal(12,26,9), colorGreen, colorWhite);
trendcolor = IIf(MACD(12,26) < 0 AND MACD(12,26) < Signal(12,26,9), colorRed, trendup);
Plot( C, "Close", trendcolor, styleBar | styleThick );

//RSIup = RSI(7) > 70;
//RSIdown = RSI(7) < 30;

sp = Param( "RSI Period", 14, 1, 100 );
r = RSI( sp );
RSIup = r > 70;
RSIdown = r < 30;

shape = RSIup * shapeNone + RSIdown * shapeNone;
PlotShapes(shape, IIf( RSIup, colorBrightGreen, colorRed ), 0, IIf( RSIup, Low, High ) );
Plot( 1, "", TRENDCOLOR , styleArea | styleOwnScale | styleNoLabel, -0.1, 50 );
//Plot( 1, "", TREND, styleArea | styleOwnScale | styleNoLabel, -0.1, 50 );

_SECTION_END();

SetChartBkColor(ParamColor("Panel color ",colorBlack));

PlotOHLC( Open, High, Low, Close, "", colorLime, styleBar| styleThick );
 
#4
hi
RSI has no meaning in your code.
the ribbon and bar color is based on macd.

then it has only half power.
rsi up has to be green up arrow,rsi downhas to red down arrow.
replace shapenone with arrows.
then you can see macd and rsi on the same chart.
macd is not ok to trade on by itself.
it needs filters.
when you follow rockwell code you need to follow it fully or else you dont any result.
good luck.
 

Similar threads