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
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
LowPass value as trading condition, but getting Error 041 #467346
07/27/17 13:15
07/27/17 13:15
Joined: Jul 2017
Posts: 2
I
Isembold Offline OP
Guest
Isembold  Offline OP
Guest
I

Joined: Jul 2017
Posts: 2
Hello everyone.

I'm sorry if this question have been asked before, but I couldn't find the answer. I'm a newbie in systematic trading, and I've chosen Zorro to start with because I already have some C programming knowledge.

I want to test a simple strategy, it's buying the candle next to a Homing Pigeon pattern and selling at the next candle, but only if we're trending up.
I decided to use a low pass filter to check the trend.
I know I'm not doing it properly, so my question is a bit more extensive.

I understood that a function that internally creates a series can not be in any order (is this correct?). But then, I don't know how should I use it if I need to take the return of that mentioned function in a loop.

Could someone tell me how should I implement(or fix my script) this?

I leave my script both attached and quoted:
Code:
function run()
{
	vars Price = series(price());
	
	StartDate = 2012;
	EndDate = 2014; 
	BarPeriod = 1440;
	BarZone = WET;
	Weekend = 1;
	LookBack = 11;
	
	
	while(price() > LowPass(Price,10))
		LifeTime = 1;
		if(CDLHomingPigeon()>0)
		{
			enterLong();
		}
	
	
}




Thank you very much in advance.

Attached Files
InsideDayUptrend.c (4 downloads)
Re: LowPass value as trading condition, but getting Error 041 [Re: Isembold] #467349
07/27/17 15:16
07/27/17 15:16
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I would replace while with if, and also try to find my missing brackets.

Re: LowPass value as trading condition, but getting Error 041 [Re: jcl] #467351
07/27/17 18:37
07/27/17 18:37
Joined: Jul 2017
Posts: 2
I
Isembold Offline OP
Guest
Isembold  Offline OP
Guest
I

Joined: Jul 2017
Posts: 2
I feel a bit shamed for having made such stupid mistake, replacing the while with the if fixed it.

A bit off topic, but would like to thank you for writing Financial Hacker, really liked every post.

Will keep reading you and improving my Zorro scripts.

Thank you very much jcl.


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