Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 927 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Wierd return for priceHigh and priceLow #486425
08/19/22 00:18
08/19/22 00:18
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
So I'm trying to determine the range of the previous candle using priceHigh(1)-priceLow(1). I also figured I'd query the priceHigh(1) and priceLow(1) functions themselves. This is a sample of what I get for the AUD/USD pair on 5 min bars.

PreviousCandleRange 0
PreviousCandleHigh -1073741824
PreviousCandleLow 1073741824
PreviousCandleRange 0
PreviousCandleHigh -1073741824
PreviousCandleLow -2147483648
PreviousCandleRange 0

Now I'd expect a range of say 10 pips and priceHigh to be something like .7000 and priceLow to be something like .6990, not the massive numbers listed here.

Re: Wierd return for priceHigh and priceLow [Re: RTG] #486426
08/19/22 00:31
08/19/22 00:31
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Not enough information. Can you post your code?

Re: Wierd return for priceHigh and priceLow [Re: RTG] #486427
08/19/22 00:36
08/19/22 00:36
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
printf("\nPreviousCandleHigh %1d", priceHigh(1));
printf("\nPreviousCandleLow %1d", priceLow(1));
printf("\nPreviousCandleRange %1d", (priceHigh(1)) - (priceLow(1)));

Dammit now I can see the problem. Use "f" not "d"

Last edited by RTG; 08/19/22 00:38.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1