Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/28/26 14:01
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Grant), 3,033 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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,814
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,814
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