You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks guys for getting back! Really appreciated.
@Ex Ovo Omnia: Within the last days, I tried really any possible combination you could think of using :: \\ " " etc. to get the image loaded but I never succeeded. So I think there is still a bug inside it.
I will wait until Doerk posted his example and see if it works for me. If not, I will give up on that.
@Doerk Hilger: Thank you very much. I will wait for your example to try it out!
Enjoy your evening guys...
Thanks guys for getting back! Really appreciated.
@Ex Ovo Omnia: Within the last days, I tried really any possible combination you could think of using :: \\ " " etc. to get the image loaded but I never succeeded. So I think there is still a bug inside it.
You don't have to try all combination but to think about what you are doing. You are trying to load a resource as a file, it will never work (See documentation about files and resources). So you have either to modify the Canvas class as proposed by Dirk (so it's no more standard), or find an other way.
I will wait until Doerk posted his example and see if it works for me. If not, I will give up on that.
And as Ovo said, the correct way to reference a resource is by replacing the leading '\\' by '::'
can.LoadFromFile("::Images\\dollar.bmp");
Enjoy your evening guys...
I was wrong at one point, copied only the first part of the macro, you really need "::Images" upfront. Sorry for that. Anyway, if you want to stuck with the original, you can derive from CCanvas and do it like show below. The problem with the original is, that are are some bugs more when calculating dimensions. I saw that they added several functions and will update the library soon.
By the way, if you do it like that with the given model, you can also deal with bitmaps that support an alpha channel.
Hi Doerk,
thank you very much for your example. It works for me as well! Great job!
Two Things:
1. As I understand from the code, you overwrite the LoadFromFile function. Is this what you have also done in your uploaded bug fixed canvas libary? If so, I am wondering why my previous example did not work even though I also tried the ::\\ Approach.
2. I just quickly tried to replace CreateBitmapLabele by CreateBitmap as it uses time an price to place the image. However, it did not work. Maybe it is too late for today and I do not see the point. I get back to it by tomorrow. However, here is the Code I tried:
Anyhow guys, thanks a lot for all of your Support so far!
Of course it does not work. You can only use a start time which matches a time of a bar. TimeCurrent() will only match when a new bar starts. When you modify this this way, it will work. I´ve tested it.