How to plot inverted chart

Hello,

Tomasz Janeczko

I first purchased Amibroker vs. 5.20 and upgraded till 6.40.4 . I am very much fond of this software still Today because of its SIMPLICITY ,EASE OF USE & USER-FRIENDLY. I am not a programmer so do not rely much on afls. and only use a few readily available on internet as most of amibroker users do. As you said Amibroker is approaching for a major upgade vs.7, I think Amibroker need the following upgradation to its Features & Tools .

1.Bullets , numbers and shapes like small & big circle should be added in Insert menus to mark Swing High Low, important levels manually.

2.Doodle feature should be added for drawing on chart & to be saved as bitmap for future reference. It will help us determining future movement of trends and patterns on chart a lot.

3.An option for INVERT CHART. Although its afl is available on the forum How to plot inverted chart, and set default chart
but it is without Y-axis values , hence of no use.

Hope you will consider the above points while upgrading to version 7. ALL THE BEST.

The code given here: How to plot inverted chart, and set default chart includes Y axis values of course.

2 posts were merged into an existing topic: Next big release (AmiBroker 7) wish list


_SECTION_BEGIN("Inverted Chart");
// invert values
C = 1 / C;
H = 1 / H;
L = 1 / L;
O = 1 / O;
PlotOHLC( O, L, H, C, "Inverted chart", colorDefault, styleCandle );
_SECTION_END();
/* I used the above code but did not get any Y-axis values, hence uploaded a .png file "Inverted Chart" for your reference*/

You do get Y axis on that screenshot - it is perfectly visible. Just the values are small because original prices are big. You might use 1000/C, or larger nominator if you want bigger values on Y axis.

@Tomasz its on some other platforms, it means reversing the scale.
so in AB highest value is at the top and lowest at the bottom.

in invert, it is more like mirror image.

kindly delete the post after view

Hello
Sorry but This is not true.
You can use negative values like -price

if( ParamToggle("Inverted chart?", "No|Yes" ) ) 
PlotOHLC(-O,-H,-L,-C," Invert chart ",colorDefault,styleCandle);

I have below code for many year now :upside_down_face: :upside_down_face:

_SECTION_BEGIN("Inverted or Shift chart");
// Drag & Drop in a chart 
ShiftBack=Param("Graph Position Χ",0,-70,50,5);
GraphXY =Param("Graph Position  Y ",0,-30,40,1);  GraphXSpace =-GraphXY ;

if( ParamToggle("Inverted chart?", "No|Yes" ) ) 
PlotOHLC(-O,-H,-L,-C," Invert chart ",colorDefault,styleCandle,0,0,ShiftBack);
else PlotOHLC(O,H,L,C," Normal chart ",colorDefault,styleCandle,0,0,ShiftBack);
_SECTION_END();

Sorry for the bad quality of this mini video
InvertChart2

5 Likes

@ambroker_saidushmant
Try using this smart technique to invert charts from @PanoS :clap:t3:

1 Like

ok, so i looked at that feature. I do not endorse it but what that does is it inverts everything. I dont see any edge by doing so :slight_smile:

so if you draw a few trend lines etc, they all invert. I don't see any benefit but just wrote to get clarity.
In AFL, you would have to apply "invert" logic to everything on the chart in that sense.

Thanks @nsm51 and @PanoS. But the y-axis coordinates are in negative values. How can I change it to positive values?

@ambroker_saidushmant, you can try this alternative (in this case the Y-axis scale will only show the closing price):

Inverse = "";
if( ParamToggle( "Inverted chart?", "No|Yes" ) )
{
    GraphXSpace = -100; // this special value will invert the plot
    Inverse = " (inverse)";
}
Plot( C, "Price" + inverse, colorDefault, styleCandle );

@tomasz, in a future version you might consider drawing the entire Y scale "inverted" as well.

you could start a new topic/discussion for this "Inverted chart".
I wonder what edge it has but these posts would make better place in their own thread instead of here.