Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to implement possible different combinations of 4 true false

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to implement possible different combinations of 4 true false

    basically I want to answer which combination of indicators work best with the MACD?

    I have the basic MACD test and I want to test the perfect combination with 4 other indicators, say EMA, SMA, HMA, VMA

    I will have inputs for these so I can optimize in the Strategy Optimizer
    boolEMA. (T or F)
    boolSMA (T or F)
    boolHMA. (T or F)
    boolVMA. (T or F)

    how do I program this in the strategy builder

    I want to do this in one set

    I was thinking of using groups

    if all
    if Close > MACD
    group (if boolEMA = true && Close > EMA)
    group (if boolSMA = true && Close > SMA)
    group (if boolHMA = true && Close > HMA)
    group (if boolVMA = true && Close > VMA)

    then
    Enter Long Order


    the above wont work because if one bool is false, everything is false and I wont have an order

    how do I do this... There are 16 possible combinations... i don't want to do 16 strategies

    basically I want to answer which combination of indicators work best with the MACD?

    #2
    Hello AaronKoRn,

    Thank you for your note.

    You can't really do this in a single set because you can't just use a bool to control the conditions in this way. Your best bet would be to create 16 separate sets of conditions each with a different combination of indicators, and then the bools could control which set gets fired off to place an entry.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X