NexusFi: Find Your Edge


Home Menu

 





Three Way Filter with Boolean Setup


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sam028 with 1 posts (2 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 zeller4 with 1 posts (0 thanks)
    1. trending_up 4,536 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404

Hello,

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.

https://screencast.com/t/IQ8mNzlO

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.
Kirk


Attached Files
Elite Membership required to download: Three_Way_Filter_Test_v01.cs
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Ceasefire in Name Only: Three Numbers That Define the Ir …
Prediction Markets & Event Contracts
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
The Confluence Meter: A Multi-Layered Signal Framework B …
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557




Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632

@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:
 
Code
                            
int val;
val = (useFilter1*4)+(useFilter1*2)+(useFilter3*1);
switch (
val)
{
 case 
0
    
Drawtext("A"False"F1: T, F2: T, F3: T", ....
    break;
...

 case 
7
    
DrawText("H",false,"  | F1: F, F2: F, F3: F", ...
    break;

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


Success requires no deodorant! (Sun Tzu)
Follow me on X Reply With Quote
Thanked by:




Last Updated on July 19, 2011


© 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