Three Way Filter with Boolean Setup - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Three Way Filter with Boolean Setup
Started:July 13th, 2011 (08:36 PM) by zeller4 Views / Replies:1,466 / 3
Last Reply:July 19th, 2011 (08:19 PM) Attachments:1

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Three Way Filter with Boolean Setup

Old July 13th, 2011, 08:36 PM   #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
Posts: 449 since Jun 2009
Thanks: 1,342 given, 376 received

Three Way Filter with Boolean Setup


I've created a small indicator with generic filter descriptions to show the 8 possible outcomes for the use of 3 filters with all the possible outcomes using booleans.

Screenshot attached.

Code attached.

I've seen some "elegant code" here and would like to see if there's a better way to produce the results I'm looking for.

at least I know I don't need 90 lines of code, plus I agree some of the resulting plots/colors/drawtext sections could easily be combined or eliminated.

Any takers?
Thanks in Advance.

Attached Files
Register to download File Type: cs Three_Way_Filter_Test_v01.cs (11.0 KB, 34 views)
Reply With Quote

Old July 13th, 2011, 08:36 PM   #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.


Old July 16th, 2011, 05:42 AM   #3 (permalink)
Site Administrator
Manta, Ecuador
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
Big Mike's Avatar
Posts: 45,444 since Jun 2009
Thanks: 28,847 given, 79,582 received


Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:

Old July 19th, 2011, 08:19 PM   #4 (permalink)
Administrator: Retired Backtester
Rennes France
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
sam028's Avatar
Posts: 3,187 since Jun 2009
Thanks: 3,429 given, 3,727 received

@zeller4, maybe using integers instead of booleans, and "switch/case" instead of "if" ?

In your code, lets say True == 0, False == 1, so something like:
int val;
val = (useFilter1*4)+(useFilter1*2)+(useFilter3*1);
switch (
Drawtext("A"False"F1: T, F2: T, F3: T", ....

DrawText("H",false,"  | F1: F, F2: F, F3: F", ...

No need to tell you you how to reduce plots/colors/drawtext sections .

Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
Reply With Quote
The following 2 users say Thank You to sam028 for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Three Way Filter with Boolean Setup

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help using Awesome Oscillator as a filter protrader007 NinjaTrader Programming 19 August 30th, 2016 04:11 PM
Filter trades by using +DMI, help needed abcplot EasyLanguage Programming 5 May 19th, 2011 03:59 PM
Cannot implicitly convert string to boolean gordo NinjaTrader Programming 7 February 22nd, 2011 04:40 PM
Just a little code assist needed for entry filter Trader.Jon NinjaTrader Programming 2 October 27th, 2010 01:25 PM
My boolean is crazy! gregid NinjaTrader Programming 3 February 27th, 2010 04:49 PM

All times are GMT -4. The time now is 04:59 PM.

Copyright © 2016 by 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 2016-10-25 in 0.07 seconds with 20 queries on phoenix via your IP