Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 53
F
faustf Offline OP
Junior Member
faustf  Offline OP
Junior Member
F

Joined: Jun 2016
Posts: 53
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: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
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: 53
F
faustf Offline OP
Junior Member
faustf  Offline OP
Junior Member
F

Joined: Jun 2016
Posts: 53
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: 54
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 54
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: 53
F
faustf Offline OP
Junior Member
faustf  Offline OP
Junior Member
F

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


Moderated by  Petra 

Gamestudio download | 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