Simple Coding Help - No Promise.

Hi Vijay,
Here it is:
Code:
_SECTION_BEGIN("Price1");
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Bollinger Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style |styleStaircase );
Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style |styleStaircase);
_SECTION_END();
 

VJAY

Well-Known Member
Hi Vijay,
Here it is:
Code:
_SECTION_BEGIN("Price1");
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Bollinger Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style |styleStaircase );
Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style |styleStaircase);
_SECTION_END();
Dear bbhanushali,,
Thanks a lot ...I searched in google but this one not found anywhere.....:up::up:
 

john302928

Well-Known Member
1531463817969.png

Does anyone have this afl Pivot high low. I would like to have the indicator as shown in the above image showing the value with the similar box around it. If anyone has please share. thanks
 

john302928

Well-Known Member
HI
currently my preferred theme as blank and if i change it to something else, later if i want to set to blank, how can i do it because it does not have any theme as blank as shown? any thoughts?
1531488259711.png
 

VJAY

Well-Known Member
HI
currently my preferred theme as blank and if i change it to something else, later if i want to set to blank, how can i do it because it does not have any theme as blank as shown? any thoughts?
View attachment 26588
is it amibroker?if so first backup ami and check if anything wrong happen just copy paste backup ami....
 
Please anyone help to plot 30 min 21 ema in 5 min chart
See if this helps:
Code:
_SECTION_BEGIN("Higher TF EMA on Smaller TF");
_SECTION_BEGIN("Price1");
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Exponential Moving Average");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
tf = Param("Higher Time Frame of your choice",1,30,200,1);

TimeFrameSet (tf*60);
choiceema = EMA(P, Periods);
TimeFrameRestore();

choiceema = TimeFrameExpand(choiceema,tf*60,expandFirst);

Plot( choiceema, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_END();
_SECTION_END();
In the sample chart below the orange line that you see is 30minutes 21EMA on 5min chart and the blue line(which is not coded above) is 21EMA on 5min chart. The default in code is 15 period and you have to choose the period and timeframe from parameters window to change it to your requirements.
21EMAImage.jpg
 
See if this helps:
Code:
_SECTION_BEGIN("Higher TF EMA on Smaller TF");
_SECTION_BEGIN("Price1");
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Exponential Moving Average");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
tf = Param("Higher Time Frame of your choice",1,30,200,1);

TimeFrameSet (tf*60);
choiceema = EMA(P, Periods);
TimeFrameRestore();

choiceema = TimeFrameExpand(choiceema,tf*60,expandFirst);

Plot( choiceema, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_END();
_SECTION_END();
In the sample chart below the orange line that you see is 30minutes 21EMA on 5min chart and the blue line(which is not coded above) is 21EMA on 5min chart. The default in code is 15 period and you have to choose the period and timeframe from parameters window to change it to your requirements.
View attachment 26592
Thanks a lot. Got what I want.
 

Similar threads