Paste a photo or drawing on the graph from the PC

Hello, is it possible to paste a cutout or photo somewhere in the chart window? I put a photo so that they see what I want.


Sorry for my ignorance but I can't understand how I can upload a photo to my graphic and paste it in a corner. I read the explanation and see the examples.
Is it done by code? there is no attach button?
The code with this function is inserted in the price code ?. And how is the photo pasted in bmp format ?. Is there an explanatory video?
GfxDrawImage( "wizard.bmp", 100, 0 ); // bitmap - fast
GfxDrawImage( "logo.png", 30, 30 ); // png - supports per-pixel alpha channel / transparency

You need 2 steps for this job

  1. Save a foto to a folder in your hard drive
  2. To Load the foto into the chart you need afl code
  3. Right click in the chart to Open the parameters window and press YES/NO
GfxSetZOrder(-1);  // load picture behind the bars / prices  
if (ParamToggle(" Load Picture ?", "No|Yes" ) )

//GfxSetZOrder(0); // load picture on top of bars / prices

1 Like

Thank you so much for your help. I just pasted the code into the price. What happens is that it occupies the entire chart and I need to paste it in some corner in smaller than my chart does not cover. I tried to see the instruction to format the inserted image but was not able.
Thanks anyway it was very useful

GfxDrawImage draws an image file. It is not image manipulation function. AB is not image resizer natively (although you could add functionality since AmiBroker is professional programming software).

But one question... do you use computers for first time in your life? Do you use Google search for first time? Or even never ever heard of it? Really? Please do yourself a favour and use Google search to look for available help on how to resize an image. It is not rocket science and you do not need any programming skills (neither for doing a search on your own nor for resizing an image) and it's all been there for many years and some decades already. It is basic task.

FYI, we have year 2020 (the wheel has been invented too... for some years).

Your first comment was constructive because you have informed me that with amibroker you cannot change the image. Now, the second comment, I prefer not to comment it as I would like out of respect for the amibroker community, which you have not wanted to ridicule me. You don't know me or you don't know my circumstances, so for education you save your words.

Every of my comments is constructive (and also here you got info about that function just drawing and you got info about how to resize a picture file without requirement of any programming background).

You don't know me

Yes, I don't know you but I have read your posts. And I am not the only one having noticed that you often ask questions which are so basic and which are so easily answered by available information if you would make more use of search functionalities. I don't have to know you or your circumstances to give you recommendation to use search more frequently/efficiently than you seem to do right now. Please take a look at some of your past posts e.g. Tomasz has given you similar recommendation multiple times to take more time to search for (basic) information on your own.Those are simply pushes in you direction to be more proactive.

BTW, I did not make statements about you as human being but I've asked questions to you to find out why it apparently is so difficult using search. Those are questions of sheer despair.

And for the record it is not against asking for help. But sometimes it looks like some help seekers sometimes (or more often than sometimes) do not make much effort on their own but instead try to take the easy route.


In others comments I have written that I do not speak English and it is all through the google translator. This makes reading, on many occasions, very understandable and that is why I do not understand many times the answers that are given to me.
a greeting

thank you for inform to the program for resize photo. thats ok.

1 Like

His solution was good. And with the help of de fxstreet I have made it smaller. But now I have the problem of being able to move the photo around the graphic. I have tried to adapt with GfxDrawImage the Mr. kamalesh's code but have not been able.
a greeting

_SECTION_BEGIN("Magnified close");
//Copyright: Kamalesh Langote Email:
Param_Color=ParamColor( "Color", colorCycle );
toggle_mclose = ParamToggle("Magnified Close","Show   |     Hide",1);
if( toggle_mclose )  {
x = Status( "pxchartwidth");
y = Status( "pxchartheight" ) ;
GfxSelectFont( "arial",  0.03*y, 800);
GfxTextOut(""+WriteVal(C,1.2)+"",0.2*x,0.03*y);} else {}


To change the position of the image you need to declare x, y
Parameters are used for below example

x = Param("Pos x Image2",55,0,1000,1);  //  Parameters are used To change the position of the image
y = Param("Pos Y Image2",55,0,1000,1);

GfxSetZOrder(-1);  // load picture behind the bars / prices  
if (ParamToggle(" Load Picture ?", "No|Yes" ) )
GfxDrawImage(image2,x,y);  //to change the position of the image you need to declare x, y 
Plot( C, "Price", colorDefault, styleCandle );
1 Like

If yes, I understand the operation of photo placement thanks to your comments in the programming. I'm going to try to do it myself and give it a few laps.
Thanks for the help.
a greeting

PanoS, awesome !!! I loved the way you made it move. This is amazing! I'm going to review the programming to learn. And thanks for the comments on the code.
a greeting