Ribbon Afl - Need help

#1
Hello Members,

Please help me plotting the ribbon. I tried but getting many errors. I have attached the image of the ribbon that I am trying to plot.

I have attached the image for reference:

Thanks all.

*********************

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBrightGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("");

//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice( "H", inDaily, -1 ); // yesterdays high
L1 = TimeFrameGetPrice( "L", inDaily, -1 ); // low
C1 = TimeFrameGetPrice( "C", inDaily, -1 ); // close
O1 = TimeFrameGetPrice( "O", inDaily, -1 ); // close
DayO = TimeFrameGetPrice( "-1", inDaily ); // current day open


Diff=H1-L1;
M = (H1+L1)/2;
MP = M/2;

P1 = H1-MP;
P2 = L1+MP;

/*Plot Ribbon */
Ribbon1=IIf( C )>( P1 ) ,colorGreen, IIf( C )>( M ), colorbrightGreen, IIf( C )>( P2), colororange,colorred));

Plot(6, "Ribbon", Ribbon1, styleOwnScale| styleArea| styleNoLabel,-0.5,100);

_SECTION_END();
 
Last edited:

Abhi1284

Active Member
#2
Hello Members,

Please help me plotting the ribbon. I tried but getting many errors. I have attached the image of the ribbon that I am trying to plot.

I have attached the image for reference:

Thanks all.

*********************

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBrightGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("");

//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice( "H", inDaily, -1 ); // yesterdays high
L1 = TimeFrameGetPrice( "L", inDaily, -1 ); // low
C1 = TimeFrameGetPrice( "C", inDaily, -1 ); // close
O1 = TimeFrameGetPrice( "O", inDaily, -1 ); // close
DayO = TimeFrameGetPrice( "-1", inDaily ); // current day open


Diff=H1-L1;
M = (H1+L1)/2;
MP = M/2;

P1 = H1-MP;
P2 = L1+MP;

/*Plot Ribbon */
Ribbon1=IIf( C )>( P1 ) ,colorGreen, IIf( C )>( M ), colorbrightGreen, IIf( C )>( P2), colororange,colorred));

Plot(6, "Ribbon", Ribbon1, styleOwnScale| styleArea| styleNoLabel,-0.5,100);

_SECTION_END();

use below line

ribbon1=IIf(C>p1,colorGreen,IIf(C>m,colorBlue,IIf(C>p2,colorOrange,colorRed)));
 

Abhi1284

Active Member
#6
***************

sent u msg with my email addy in subject
as per ur query

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBrightGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("");

//TIME FRAME CALCULATION
H1 = TimeFrameGetPrice( "H", inDaily, -1 ); // yesterdays high
L1 = TimeFrameGetPrice( "L", inDaily, -1 ); // low
C1 = TimeFrameGetPrice( "C", inDaily, -1 ); // close
O1 = TimeFrameGetPrice( "O", inDaily, -1 ); // close
DayO = TimeFrameGetPrice( "-1", inDaily ); // current day open


Diff=H1-L1;
M = DIFF/2;
MP = M/2;

P1 = L1+MP;//25%
P2 = L1+M;//50%
P3=L1+MP+M;//75%


/*Plot Ribbon */
ribbon1=IIf(C>P3,colorDarkGreen,IIf(C>P2,colorGreen,IIf ( C>P1,colorOrange,IIf(C<P1,colorRed,colorWhite)))) ;

Plot(6, "Ribbon", Ribbon1, styleOwnScale| styleArea| styleNoLabel,-0.5,100);

_SECTION_END(); _SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBrightGreen ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("");
 
Last edited:

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?