Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
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