Display Table-like data (like Excel spreadsheet) on chart

Hi every one,

I want to display some of my own calculation on the Chart. I'm looking at AFL function, but it can only display text.

Please suggest me what is the best way to display a Table with 3 Columns & 5 rows to Ami chart. (Value changing depend on selected bar)

Thank you

In general you should use Gfx functions. You can even find example code in AB documentation (gfxdrawtext):





Why not use Exploration http://www.amibroker.com/guide/h_exploration.html

Chart window is for charts. Exploration is for table display.

How about using things in a way they were designed for?

Chart is NOT designed for text / tabular output. Sure you can do that in dozens of ways, but much better place is Exploration. Or Interpretation window.

Just a thought that you may get better results by using a spoon instead of a fork to eat your soup.


I want this type of exploration.

Please help me,

Partial untested code for reasons best known to you.

// Define the condition variables here
	SetOption("NoDefaultColumns", True);
	Filter = 1;
	AddTextColumn( WriteIf( condition1, "Rising", "Down" ), "Price"  , 1, colorBlack, colorLightGrey, 70);
	AddTextColumn( WriteIf( condition2, "Rising", "Down" ), "Volume" , 1, colorBlack, colorLightGrey, 70);
	AddTextColumn( WriteIf( condition3, "Rising", "Down" ), "OI"	 , 1, colorBlack, colorLightGrey, 70);
	AddTextColumn( WriteIf( condition4, "Strong", "Weak" ), "Market" , 1, colorBlack, colorLightGrey, 70);

Spending more time writing loops didn't seem viable for me.

EDIT: And if you need the default columns, comment the SetOption() line

1 Like


Getting Errror

Ofcourse my friend, its partial code, you have to define the condtion variables.

I'm not a mind reader. You have to take time to atleast read my post more attentively.


Thank @Milosz it works very well for me.

I editted the Line drawing code so everyone can re-use it.

Origianl code:

**for** ( Col = 1; Col < 6; Col++ ) 
GfxMoveTo( Col * CellWidth, 0); 
GfxLineTo( Col * CellWidth, 10 * CellHeight ); 

I add Row & Column Start and End Value (first Col = 0)

row_Start = Param("row_Start", 1,0,100,1,0); 
row_End = Param("row_End", 4,0,100,1,0); 

Col_Start = Param("Col_Start", 0,0,100,1,0); 
Col_End = Param("Col_End", 11,0,100,1,0);

//Horizontal Line
for  (row = row_Start; row < row_End+2; row++)
GfxMoveTo( Col_Start, row * CellHeight ); 
GfxLineTo( (Col_End+1) * CellWidth, row * CellHeight ); 

//Vertical Line
for( Col = Col_Start; Col < Col_End+2; Col++ ) 
GfxMoveTo( Col * CellWidth, row_start*CellHeight); 
GfxLineTo( Col * CellWidth, (row_End+1) * CellHeight );