Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Optimize variable

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

    Optimize variable

    Hi

    Suppose

    a= b+c+d;


    b= some indicator value
    c= some indicator value
    d= some indicator value

    How can I optimize a such that it goes through all possible values of b,c,d without having to individual opt those particular indicator values.

    Basically I want to optimize c in a way that it tries to find the best combination of values in b,c,d. Also note I understand that I can optimize each individual b,c,d individually and find the best combination/sum for variable "a" but I'm curious if it's possible to programically optimize a in a way that it automatically changes the values in b,c,d

    Thaks
    Last edited by staycool3_a; 01-08-2018, 12:05 AM.

    #2
    Hello calhawk01,

    Thank you for the post.

    This is not necessarily something the platform could do by its self, but this is likely something you could do yourself using logic.

    The built-in optimization tool would simply run iterations over a range of all possibilities and report the results. If you are trying to fine-tune a value based on some other values, you would likely need to do this using your own logic to differentiate what constitutes the best result when combined.

    You are able to programmatically change indicators values while the script is running so I do not see why this would not be possible to create.

    Regarding your question:
    Also note I understand that I can optimize each individual b,c,d individually and find the best combination/sum for variable "a" but I'm curious if it's possible to programmatically optimize "a" in a way that it automatically changes the values in b,c,d
    It sounds like these are essentially the same process, if you are changing the individual parameters of b,c,d to find the best a value, that would essentially be the same as optimizing a while automatically changing the b,c,d values to create a. You would still be changing the values of b,c,d to create a to "optimize" it, it would just be doing this programmatically instead of your hand-picked values.

    To get an idea of various ways to accomplish this, you could search online for topics like:
    "c# calculate all possible combinations"
    "c# calculate permutations"

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    7 views
    0 likes
    Last Post PaulMohn  
    Started by ZenCortexAuCost, Today, 04:24 AM
    0 responses
    6 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by ZenCortexAuCost, Today, 04:22 AM
    0 responses
    3 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by SantoshXX, Today, 03:09 AM
    0 responses
    16 views
    0 likes
    Last Post SantoshXX  
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    5 views
    0 likes
    Last Post DanielTynera  
    Working...
    X