Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
6 registered members (JeyKey II, EW_bytes, krishna, AndrewAMD, rht, EvanTJ), 12,503 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Plot nothing #419104
03/06/13 11:47
03/06/13 11:47
Joined: Nov 2012
Posts: 209
S
SFF Offline OP
Member
SFF  Offline OP
Member
S

Joined: Nov 2012
Posts: 209
While debugging, this simple code plots nothing and I don't know why.
Why this happens. It is complied.

Code:
int trendPeriod = 1;


function run(){
	
  set(TICKS);

 
 
 vars ma = series(EMA(priceClose(),trendPeriod));
 

 
plot("Signal", ma[0], 0, RED);


}


Last edited by SFF; 03/06/13 11:48.
Re: Plot nothing [Re: SFF] #419107
03/06/13 11:56
03/06/13 11:56
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
I think that does not even compile, due to the missing series in the EMA call.

Re: Plot nothing [Re: jcl] #419108
03/06/13 12:00
03/06/13 12:00
Joined: Nov 2012
Posts: 209
S
SFF Offline OP
Member
SFF  Offline OP
Member
S

Joined: Nov 2012
Posts: 209
That is a newbie mistake.
Thank you.

Re: Plot nothing [Re: SFF] #419109
03/06/13 12:10
03/06/13 12:10
Joined: Nov 2012
Posts: 209
S
SFF Offline OP
Member
SFF  Offline OP
Member
S

Joined: Nov 2012
Posts: 209
When I set trendPeriod = 1, It says below.

Error 011: Function EMA called with invalid data.

Why this considered invalid?

Re: Plot nothing [Re: SFF] #419116
03/06/13 14:07
03/06/13 14:07
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
Because Zorro uses the ta-lib indicators that are very complaining when fed with bad data. trendPeriod = 1 is not really invalid, but makes no sense either, therefore the error message.

Re: Plot nothing [Re: jcl] #419338
03/09/13 05:18
03/09/13 05:18
Joined: Nov 2012
Posts: 209
S
SFF Offline OP
Member
SFF  Offline OP
Member
S

Joined: Nov 2012
Posts: 209
This simple script only plots SMA, but don't enter although there is a clear signal on the chart.

Anything wrong?

Code:
int period=55;


function run(){

set(PLOTPRICE+PLOTNOW);
BarPeriod = 15;
LookBack = 500;
StartDate = 20121024;
NumDays = 55;

  set(TICKS);

TimeFrame = 1;
vars Close15 = series(priceClose());
vars tmp115 = series(SMA(Close15,period));


if(crossUnder(priceClose, tmp115))
enterShort();

plot("sma", tmp115[0], 0, RED);

}



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