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 (TipmyPip, VoroneTZ), 769 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
What does g->_somevar mean? #486763
10/02/22 12:34
10/02/22 12:34
Joined: Aug 2022
Posts: 12
N
nerdkorea Offline OP
Newbie
nerdkorea  Offline OP
Newbie
N

Joined: Aug 2022
Posts: 12
I see this in the indicators.c file and I'm trying to understand the code. there is for example
Code
f(Color) sprintf(PlotName,"ZigZag%x",Color);

	if(IS(FIRSTRUN)) {
		_HighPrice = Price;
		_LowPrice = Price;
		_LastPrice = Price;
		_LastBar = _HighBar = _LowBar = g->nBar;
		_Dir = 0;
		if(Color) {
			plotGraph(PlotName,0,_LastPrice,LINE,Color);
			plotGraph(PlotName,0,_LastPrice,LINE+END,Color);
		}
		g->vLength = 1;
		return g->vSign = g->vPeak = g->vSlope = 0;
	}


What does this mean? I'm trying to convert the zorro indicator to python code.

Edit: google helped me out. I kind of understand it now except I'm not sure what g->nbar stands for.

Last edited by nerdkorea; 10/02/22 13:44.
Re: What does g->_somevar mean? [Re: nerdkorea] #486765
10/03/22 07:22
10/03/22 07:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Most g-> variables are documented, but under slightly different names. Look in the file variables.h. It translates g-> variables to user friendly names that you can look up in the manual.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1