Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, degenerate_762, AndrewAMD, ozgur), 774 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Printf list series is possible ? #482167
01/04/21 23:49
01/04/21 23:49
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
hi guys
i saw in manual the printf return always a simple variable , but is possible return a series like this ?
Code
function run()
{
   BarPeriod = 24 * 60; // 1 day
   asset("EUR/USD");
 vars PriceHL = series(priceHigh() - priceLow());

var CellO = SMA(PriceHL, 48) + StdDev(PriceHL, 48);

   printf("Result = %.f\n", CellO);
   plot("MedianPriceOpenClose2", CellO, NEW, RED);
}

i tested but return me always 0 but if i plot i saw the line line
thanks at all

Re: Printf list series is possible ? [Re: faustf] #482174
01/05/21 15:13
01/05/21 15:13
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Yes but better put the \n at the begin of the string, otherwise it gets printed behind the bar line.

Re: Printf list series is possible ? [Re: Petra] #482178
01/06/21 11:34
01/06/21 11:34
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
but why print always 0 ? instead in plot chart draw line ?? (and see value )

Re: Printf list series is possible ? [Re: faustf] #482184
01/07/21 18:54
01/07/21 18:54
Joined: Dec 2019
Posts: 53
ozgur Online
Junior Member
ozgur  Online
Junior Member

Joined: Dec 2019
Posts: 53
There are 3 mistakes, compare yours to below one.

Code
function run()
{
   set(PLOTNOW);
   LookBack = 48;
   BarPeriod = 24 * 60; // 1 day
   asset("EUR/USD");
   vars PriceHL = series(priceHigh() - priceLow());

   var CellO = SMA(PriceHL, 48) + StdDev(PriceHL, 48);

   printf("Result = %.4f\n", CellO);
	
   plot("Max15Chars", CellO, NEW, RED);
}

Last edited by ozgur; 01/07/21 18:55.
Re: Printf list series is possible ? [Re: faustf] #482242
01/15/21 17:26
01/15/21 17:26
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
thanks i will test this week end , but thanks again for support


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1