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 (), 25,252 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
Porblem with 'inconsistent series call' error #430324
09/26/13 20:21
09/26/13 20:21
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
I am trying to add some functions to Workshop6_1 and I've run into an error "inconsistent series call" and I don't know why. I'm trying to figure out if this is something I'm doing wrong, or if it is a Zorro glitch or some sort of nesting limit??

I've simplified it way down to the actual line of code that causes the issue (highlighted in yellow below). Here is the excerpt from Workshop6_1:
Quote:
// portfolio loop
while(asset(loop("EURUSD","USDJPY")))
while(algo(loop("TRND","CNTR")))
if (12 & (1 << dow()))
{
if(Algo == "TRND")
tradeTrend();
else if(Algo == "CNTR")
tradeCounterTrend();
}

(The code is part of a bigger function (I posted elsewhere) that checks to see if the current dow() is within a specified bit combination, in this case Wed or Thurs)

THANKS

Re: Porblem with 'inconsistent series call' error [Re: dusktrader] #430334
09/26/13 22:53
09/26/13 22:53
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline
Newbie
Pork  Offline
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
Do you need two ampersands for an if?
if(condition && condtion)
P

Re: Porblem with 'inconsistent series call' error [Re: Pork] #430349
09/27/13 07:31
09/27/13 07:31
Joined: Jul 2000
Posts: 28,140
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,140
Frankfurt
I believe the '&' is ok, but you must not make series calls dependent on an if condition - see manual. Put the dow() dependence into the trade algorithms before entering the trades.

Re: Porblem with 'inconsistent series call' error [Re: jcl] #430366
09/27/13 10:29
09/27/13 10:29
Joined: Jul 2013
Posts: 522
D
dusktrader Offline OP
User
dusktrader  Offline OP
User
D

Joined: Jul 2013
Posts: 522
Arrrg! You're right, and I've been bitten by this same issue before! Thanks for the pointer on this.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1