NexusFi: Find Your Edge


Home Menu

 





Three Way Filter with Boolean Setup


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 1 posts (1 thanks)
    2. looks_two zeller4 with 1 posts (0 thanks)
    3. looks_3 sam028 with 1 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,796 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?
My Rant with AMP Futures
Trading Reviews and Vendors
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
What we know about Binances $6.3bn hack - BBC News
Cryptocurrency
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
 
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
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,599




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 Administrator
 
Posts: 3,779 since Jun 2009
Thanks Given: 3,840
Thanks Received: 4,709

@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)
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