Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 747 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
crossOver() Pointer Expected Error #487452
04/28/23 04:47
04/28/23 04:47
Joined: Apr 2023
Posts: 19
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 19
I have the following code that goes long or short when LeadSine crosses over or under SineWave.

Code
function run() 
{
	set(LOGFILE);
	asset("EUR/USD");
	
	vars Prices = series(price());
	vars SineWave = series(HTSine(Prices));
  
	  if(crossOver(rLeadSine, rSine)){
		  enterLong();
	  } else if(crossUnder(rLeadSine, rSine)){
		  enterShort();
	  }  

	  
}


However, zorro returns the following error:
Code
crossOver(): Pointer expected
< 	  if(crossOver(rLeadSine, rSine)){
 >.


Is it because the rLeadSine and rSine are not series? Not sure how to proceed with this.

Re: crossOver() Pointer Expected Error [Re: vicknick] #487454
04/28/23 12:46
04/28/23 12:46
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Yes, it’s because they are not series. crossOver() requires a vars, but you only supplied a var and a var.

So make a vars that is a series, like you already did in your code, and feed it to the function.

Re: crossOver() Pointer Expected Error [Re: AndrewAMD] #487458
04/29/23 03:14
04/29/23 03:14
Joined: Apr 2023
Posts: 19
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 19
Thanks! That seems to work now


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