Magic Numbers

Post Reply
garyfritz

Re: Magic Numbers

Post by garyfritz »

followNev wrote:Do I simply write the code as:
if ( OrderMagicNumber () != MagicNumberLong) continue;
if ( OrderMagicNumber () != MagicNumberShort) continue;
?
No -- if the # is MagicNumberShort, the first test will skip to the next order and you'll never see your short order.

You could do something like

if ( OrderMagicNumber () != MagicNumberLong && OrderMagicNumber () != MagicNumberShort) continue;

That way, it only skips to the next order if the # isn't your long # AND it isn't your short #.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Magic Numbers

Post by SteveHopwood »

followNev wrote:Thank you garyfritz.
I'll try your way, as mine compiles without errors but obviously didn't work out the way I wanted it too. :|
I know the feeling. :lol:

Keep going, won't you? You would not believe what I was hard-coding in my early days with this stuff. I had hard-coded Digits before I discovered Digits. :lol: Yep. Really. Not joking.

Ignore any subsequent comments about my coding by Gary. He once managed to ban himself, and so has not a leg to stand on. :lol:

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
garyfritz

Re: Magic Numbers

Post by garyfritz »

I'll point out that as a result, *I* have valuable life experience you do not. Keep that in mind, sirrah. :lol:
User avatar
Jemook
Trader
Posts: 1085
Joined: Thu May 10, 2012 10:19 am
Location: Bondi, Sydney, Australia

Re: Magic Numbers

Post by Jemook »

SteveHopwood wrote:Ignore any subsequent comments about my coding by Gary. He once managed to ban himself, and so has not a leg to stand on. :lol:

:D
Cracks me up every time!
Please note I am no longer affiliated with Global Prime. I've moved on to my next adventure with Afterprime.

Catch me here: https://www.afterprime.com
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Magic Numbers

Post by SteveHopwood »

Jemook wrote:
SteveHopwood wrote:Ignore any subsequent comments about my coding by Gary. He once managed to ban himself, and so has not a leg to stand on. :lol:

:D
Cracks me up every time!
Me too. That is why I bring it up from time to time, even though I promised not to. Gary takes it like a real trouper.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Post Reply

Return to “Coders Hangout”