NexusFi: Find Your Edge


Home Menu

 





My boolean is crazy!


Discussion in NinjaTrader

Updated
    1. trending_up 3,759 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623

This is beyond me
I have very simple boolean in my strategy:

private bool useTrailingMax = true;

and when I use it in the code like this:

if (useTrailingMax == false);
{
Print(
"useTrailingMax: "+useTrailingMax);
}

it prints:

useTrailingMax: true

Have you ever encountered anything similar?
Please advise cause I am getting crazy over this bug and I can't run my strategy because of it


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632


Try to remove this dirty ;:
...
if (useTrailingMax == false);
...


Success requires no deodorant! (Sun Tzu)
Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623

Sam - you are my hero! I knew it must be something stupid!


Started this thread Reply With Quote




Last Updated on February 27, 2010


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts