@Happy_Singh could you please help in this
use styleNoRescale in the plot statement
.
_SECTION_BEGIN("Percent Change from Previous Day Close");
AbsoluteorPercent = ParamToggle("Percent or AbsValue Plot?","Percent|AbsValue",0);//Use this toggle to select % or Difference Points
C1 = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
TC = Close; //Current close
Diff = TC-C1;
Percent = (Diff/C1)*100;
nd = Day()!=Ref(Day(),-1);
prc = Valuewhen(nd,Ref(Percent,-1));
Percentcolor = IIf(Percent>prc,colorGreen,colorOrange);
if(AbsoluteorPercent == 0)
{Plot(Percent,"% Change ",Percentcolor,styleline);
prc = Valuewhen(nd,Ref(Percent,-1));
Plot(prc,"",colorred,styleDashed|styleNoLabel|styleNoRescale|styleStaircase,0,0,0,-1,1.5);
PlotText("PDC "+ WriteVal(prc,1.2), BarCount+2, SelectedValue(prc),colorred,colorDefault,-4);}
if(AbsoluteorPercent == 1)
{Plot(Diff,"Value Change ",Percentcolor,styleline);
prc = Valuewhen(nd,Ref(Diff,-1));
Plot(prc,"",colorred,styleDashed|styleNoLabel|styleNoRescale|styleStaircase,0,0,0,-1,1.5);
PlotText("PDC "+ WriteVal(prc,1.2), BarCount+2, SelectedValue(prc),colorred,colorDefault,-4);}
_SECTION_END();
_SECTION_BEGIN("Percent Point Change from Previous Day Close on Price Panel");
showChangeValues = ParamToggle("Show Change Value?","No|Yes",0);//Use this toggle to show or not to show change values on chart pane
C1 = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
TC = Close; //Current close
Diff = TC-C1;
Percent = (Diff/C1)*100;
nd = Day()!=Ref(Day(),-1);
prc = Valuewhen(nd,Ref(Percent,-1));
Percentcolor = iIf(Percent>prc,1,0);
x=Param("xposn",895,0,1000,1);// Use to move around on your chart horizontally
y=Param("yposn",25,0,1000,1);// Use to move around on your chart vertically
if(showChangeValues)
{
GfxSetBkMode( 1 );
GfxSelectFont("Courier New", 18, 700 );
GfxSetTextColor( colorblue );
GfxTextOut(""+WriteVal(TC,1.2), x,y);
if(Percentcolor=1)
{GfxSetTextColor(colorgreen);}//above previous day close percent/diff
if(Percentcolor=0)
{GfxSetTextColor(colorred);}// below previous day close percent/diff
GfxSelectFont("Courier New", 8, 700 );
GfxTextOut(""+WriteVal(Diff,1.2),x,y+23);
GfxTextOut("("+WriteVal(Percent,1.2)+"%)",x+45,y+23);
}
_SECTION_END();
_SECTION_BEGIN("Percent Point Change from Previous Day Close on Price Panel");
showChangeValues = ParamToggle("Show Change Value?","No|Yes",0);//Use this toggle to show or not to show change values on chart pane
C1 = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
TC = Close; //Current close
Diff = TC-C1;
Percent = (Diff/C1)*100;
nd = Day()!=Ref(Day(),-1);
prc = Valuewhen(nd,Ref(Percent,-1));
Percentcolor = iIf(Percent>prc,1,0);
x=Param("xposn",895,0,1000,1);// Use to move around on your chart horizontally
y=Param("yposn",25,0,1000,1);// Use to move around on your chart vertically
if(showChangeValues)
{
GfxSetBkMode( 1 );
GfxSelectFont("Courier New", 18, 700 );
GfxSetTextColor( colorblue );
GfxTextOut(""+WriteVal(TC,1.2), x,y);
if(Percentcolor=1)
{GfxSetTextColor(colorgreen);}//above previous day close percent/diff
if(Percentcolor=0)
{GfxSetTextColor(colorred);}// below previous day close percent/diff
GfxSelectFont("Courier New", 8, 700 );
GfxTextOut(""+WriteVal(Diff,1.2),x,y+23);
GfxTextOut("("+WriteVal(Percent,1.2)+"%)",x+45,y+23);
}
_SECTION_END();
_SECTION_BEGIN("Percent Point Change from Previous Day Close on Price Panel");
showChangeValues = ParamToggle("Show Change Value?","No|Yes",0);//Use this toggle to show or not to show change values on chart pane
C1 = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
TC = Close; //Current close
Diff = TC-C1;
Percent = (Diff/C1)*100;
nd = Day()!=Ref(Day(),-1);
prc = Valuewhen(nd,Ref(Percent,-1));
Percentcolor = WriteIf(Percent>prc,"Up","Dn");
x=Param("xposn",895,0,1000,1);// Use to move around on your chart horizontally
y=Param("yposn",25,0,1000,1);// Use to move around on your chart vertically
if(showChangeValues)
{
GfxSetBkMode( 1 );
GfxSelectFont("Courier New", 18, 700 );
GfxSetTextColor( colorblue );
GfxTextOut(""+WriteVal(TC,1.2), x,y);
if(Percentcolor=="Up")
{
GfxSelectFont("Courier New", 8, 700 );
GfxSetTextColor(colorgreen);//above previous day close percent/diff
GfxTextOut(""+WriteVal(Diff,1.2),x,y+23);
GfxTextOut("("+WriteVal(Percent,1.2)+"%)",x+45,y+23);
GfxTextOut("|Y-day Cl = "+WriteVal(prc,1.2)+"% |",x,y+33);//comment this line if you don't want it to appear in chart panel.
}
if(Percentcolor=="Dn")
{GfxSetTextColor(colororange);// below previous day close percent/diff
GfxSelectFont("Courier New", 8, 700 );
GfxTextOut(""+WriteVal(Diff,1.2),x,y+23);
GfxTextOut("("+WriteVal(Percent,1.2)+"%)",x+45,y+23);
GfxTextOut("|Y-day Cls = "+WriteVal(prc,1.2)+"% |",x,y+33);//comment this line if you don't want it to appear in chart panel.
}
}
_SECTION_END();