Posted By: Isembold
LowPass value as trading condition, but getting Error 041 - 07/27/17 13:15
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:
Thank you very much in advance.
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.