Simple Coding Help - No Promise.

http://prntscr.com/eedmo9

how can i do auto scaling so i can see full price on chart?
Right click on chart . . .

Choose Parameters from context menu

open Axis & Grid Tab and in it

for first parameter Scaling. . .choose automatic :thumb:


Happy :)


In your screen shot, seems the moving average line at the bottom is causing problem . . .

comment it out and see what happens . . .
 
post the code . . .


Happy :)
_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 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("MA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 800, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();


_SECTION_BEGIN("Long MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("mid ma");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
 
Code:
_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 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("MA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 800, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();


_SECTION_BEGIN("Long MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleNoRescale|styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("mid ma");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleNoRescale|styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), styleNoRescale|ParamStyle("Style") ); 
_SECTION_END();
Happy :)
 
Code:
_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 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("MA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 800, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();


_SECTION_BEGIN("Long MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleNoRescale|styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("mid ma");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 800, 1 );
Avg = MA( P, Periods );
PlotOHLC(Avg + 0.1, Avg + 0.1, Avg - 0.1, Avg - 0.1, "Avg",ParamColor( "Color", colorCycle ) , styleNoRescale|styleCloud | styleClipMinMax);
_SECTION_END();

_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), styleNoRescale|ParamStyle("Style") ); 
_SECTION_END();
Happy :)
thanks a ton
 
Happy ji, I my self modified some buy/sell signal conditions in 1st version of Varun's obv method, I'm getting signals for the ema crossover of OBV,

But I want to add one more condition as filter, I don't know how to do it, pls help me in your free time

FILTER :

BUY = price close above EMA200

SELL = Price close below EMA200


DM
 

vijkris

Learner and Follower
Happy ji, I my self modified some buy/sell signal conditions in 1st version of Varun's obv method, I'm getting signals for the ema crossover of OBV,

But I want to add one more condition as filter, I don't know how to do it, pls help me in your free time

FILTER :

BUY = price close above EMA200

SELL = Price close below EMA200


DM
i think u know this...
buy = ur condition AND c>ema(c,200);
sell = ur condition and c< ema(c,200);
 

Similar threads