Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by jcl. 02/12/26 14:05
MarginCost discrepancy?
by jcl. 02/12/26 14:02
Hedge on FXCM, 4 or 5?
by qin. 02/11/26 14:12
CMC MT4 CFD vs FX Active - what's better?
by mayarik. 02/11/26 11:00
print a "still alive" log
by qin. 02/10/26 12:16
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 7,786 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon, mayarik
19198 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: 183
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 183
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,811
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,811
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: 183
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 183
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