Gamestudio Links
Zorro Links
Newest Posts
Alternative to Stooq for Zorro S
by Petra. 10/14/26 07:04
ZorroGPT
by TipmyPip. 10/13/26 17:08
Stooq now requires an API key
by cwford. 10/08/26 23:27
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 22,463 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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: 603
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 603
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: 55
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 55
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