Wanted Inverted chart with values

amitrandive

Well-Known Member
#11
Hi Amit ji..

Yes, you are correct in your understanding... Obviously, this would only give you approximate values, but with very close approximation..

Use the following to insert in its own panel:

Code:
_SECTION_BEGIN( "Inverse" );
SetChartOptions( 0, chartShowArrows | chartShowDates | chartWrapTitle | chartLogarithmic );

O = 1 / O;
C = 1 / C;
IH = 1 / L;
IL = 1 / H;
H = IH;
L = IL;

_N( Title = StrFormat( "{{NAME}} (Inversed) - {{INTERVAL}} {{DATE}} InvOpen %.4f%, InvHigh %.4f%, InvLow %.4f%, InvClose %.4f% (%.2f%%), {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
Plot( C, "InvClose", colorDefault, styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );

_SECTION_END();
Thanks for the code, this works very well!!!
:clapping:
 

colion

Active Member
#12
Thanks for the code, this works very well!!!
:clapping:
You can keep the Y-axis values the same as the normal chart but with a negative value which you might find useful:

PlotOHLC( -O, -L,- H, -C, "", colorWhite, styleBar);

You can also invert indicators using Plot():

Plot( -RSI(), "", colorRed, styleLine );
 

amitrandive

Well-Known Member
#13
You can keep the Y-axis values the same as the normal chart but with a negative value which you might find useful:

PlotOHLC( -O, -L,- H, -C, "", colorWhite, styleBar);

You can also invert indicators using Plot():

Plot( -RSI(), "", colorRed, styleLine );
Thanks Colion
:clapping:
 

Similar threads