Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, Ayumi), 773 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
plotText? #486456
08/21/22 21:59
08/21/22 21:59
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
I want to put some text at the top of every candle on the chart, so I can plot some visual values along with the graphic plot lines.

Toward this end, I tried:

plotText("Message",wdateBar(0),priceH(0)+.01,"Text Goes Here!",0+64+128,BLACK);

but that doesn't seem to work. Suggestions?

Re: plotText? [Re: WaltT] #486461
08/23/22 13:29
08/23/22 13:29
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline
Newbie
anissyo  Offline
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
I can suggest printing to the log file instead :

you need to add set(LOGFILE); inside the run() function

then just print stuff that you want using :

print (TO_LOG," stuff that you want to print");

But keep in mind that you will need to convert float or int to strings, just ask me to show you how to convert them to strings if it's what you need.

the output of the print() statement is visible in the log file that will appear in notepad ++ once you click test

Re: plotText? [Re: anissyo] #486465
08/23/22 16:31
08/23/22 16:31
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
Thanks for the suggestion. I already do that. The reason I wanted the text on the chart is that I wanted a quick way to visualize some test results against the chart itself, like noticing at a glance whether a buy or a sell was made at a relative peak or valley, or whether they occurred after certain visual chart patterns.

I've sent an email to Zorro support because I tried the example command they supplied in the manual for plotText, and even their example code doesn't work! I suspect there's a bug somewhere.

Re: plotText? [Re: WaltT] #486469
08/24/22 12:15
08/24/22 12:15
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline
Newbie
anissyo  Offline
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
AH ok ok, nice nice. I hope that you will get that to work I tried to use it too in the past but I ended up just using print() instead, good luck =)

Re: plotText? [Re: anissyo] #486470
08/24/22 19:11
08/24/22 19:11
Joined: Aug 2022
Posts: 15
Connecticut USA
W
WaltT Offline OP
Newbie
WaltT  Offline OP
Newbie
W

Joined: Aug 2022
Posts: 15
Connecticut USA
Interesting thing ... I just found that the function does seem to work ... sort of.

However, it doesn't quite behave as I expected. The code I listed above results in a single message appearing in one place only on the graph in very small type. I thought it would appear with every bar, but it doesn't. It just appears once on the graph.

I haven't figured out how it interprets the X, Y values. If you don't zoom on the "correct" section of the graph, you won't see it at all. The X,Y values don't seem to correlate with the date or price level at all. To see it, you have to zoom in at least one level deep on the correct portion of the chart, and you can't see it at all in the original, normal, full-out view at all.

I'm experimenting to see if I can figure out more about how this function works. I'll try looping through all of the bars to see if that works.

When I printf the value of wdate(n) to a float format, I get a result like this one: 38328.125000. The first 5 digits seem to represent one single day, so I'm guessing that the six digits after the decimal refer to a decimalized breakdown of the time in a day to roughly tenths of a second (or slightly greater). I've never seen this particular timestamp before. Have you? I suspect I'll need to convert this to a more conventional timestamp in order to get the x-axis to plot where I want it to plot.

Last edited by WaltT; 08/24/22 23:54.
Re: plotText? [Re: WaltT] #486471
08/25/22 10:33
08/25/22 10:33
Joined: Mar 2021
Posts: 42
Casablanca, Morocco
anissyo Offline
Newbie
anissyo  Offline
Newbie

Joined: Mar 2021
Posts: 42
Casablanca, Morocco
This format? no, I have not seen this format for timestamps before, all of this need a lot of attention to understand and I really can't right now, I need to work on some code, but I hope that you manage to sort things out bro

Re: plotText? [Re: WaltT] #486477
08/27/22 01:22
08/27/22 01:22
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You can plot text on relative or absolute xy position, absolute x is pixels and relative x is bar offset. You see text only when you zoom in.

The format is the usual windows date/time format, simply number of days since 1900.



Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1