Null check indicator ideas for NT8 - NinjaTrader Programming | futures io social day trading
futures io futures trading

Null check indicator ideas for NT8
Updated: Views / Replies:394 / 1
Created: by Sim22 Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Null check indicator ideas for NT8

  #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NinjaTrader, MarketDelta
Favorite Futures: 6J, CL, GC
Sim22's Avatar
Posts: 43 since May 2010
Thanks: 52 given, 117 received

Null check indicator ideas for NT8

One day I just had the sh*ts with NT8 having brush freezing/disposal issues when left idle for a while ie. possible multi-threading issues.
I decided to write some extension methods that might help with this. (Warning: these are not thoroughly tested!)


// normal code for freezing a brush
Brush myBrush Brushes.Red;
I've written an extension that checks it for null before freezing it:

// extension code instead
Brush myBrush Brushes.Red;
Also disposal of SharpDx objects:

SharpDx.Direct2D.Brush myBrushDx;

// Dispose by
if(myBrushDx != null)

//Extension instead
I've also created an opacity extension:


Brush myBrush 

myBrush myBrush.ChangeOpacity(int Opacity); // or double Opacity
You can also use the 'NotNull' extension to check for null values within Linq statements. Please peruse the actual indicator for some ideas. You will find the extensions within the Addons folder called Sim22BrushExtensions and Sim22NotNullExtensions. The actual indicator does nothing, it's just for the code: Sim22_NullSample.

You need to make sure in the declarations you set: using Sim22BrushExtensions; using Sim22NotNullExtensions;

I'd appreciate anyone having a play and suggesting ideas. I won't be able to answer for a few days so I hope I wake to find some interesting comments

Attached Files
Register to download File Type: zip (5.5 KB, 9 views)
Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


futures io > > > > > Null check indicator ideas for NT8

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

September Journal Challenge (sponsored by TopstepTrader)


Free Elite Membership: Twitter Tuesday and Facebook Friday!

Tue & Fri

5 Top Traits of Market Wizards w/John Hoagland @ TopstepTrader

Sep 25

Breaking Down an Equity Trading System: Step-by-step w/RandBots

Sep 27

Anthony Drager (TBD)

Oct 4

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone have any good indicator ideas for NT8? MiiMeldon NinjaTrader Programming 5 November 15th, 2016 05:48 PM
Any indicator for divergence check? sw88 Sierra Chart 5 January 12th, 2016 06:59 PM
indicator check ankityadav MetaTrader 0 October 10th, 2013 06:22 AM
Indicator to check consolidation danjuma NinjaTrader 4 February 26th, 2012 12:48 PM
Indi works on chart, not in Market Analyzer. Null ref check? MXASJ NinjaTrader Programming 5 May 12th, 2011 09:34 PM

All times are GMT -4. The time now is 10:09 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts
Page generated 2018-09-23 in 0.09 seconds with 15 queries on phoenix