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

Indicator as a prameter for another indicator

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

    Indicator as a prameter for another indicator

    Hi,

    I am wondering if it is possible to specify an indicator in the parameters list of another indicator?

    I case this isn't clear on what I want to do, here is a scenario. I have an indicator/strategy and I want to give go/no go priority to another indicator. I might like to try this a lot, so parameters rather than hard coding might be desirable.

    So, strategy/indicator would be saying buy/sell, but go/no go relies in the value of a user specified indicator (and probably associated values in another parameter) that will have the final say.

    I hope this makes sense.

    If this is possible and you are aware of any code samples, I'd appreciate a pointer.

    Thanks.

    #2
    Hell pjsmith,

    Thanks for opening the thread.

    It is possible to create an enum as an input parameter so you can select specify an indicator to use from your enum. The logic would have to branch out for each enum selected/indicator to use.

    We have a publicly available sample that demonstrates this within our Reference Samples section of the forums. I will provide a link below.

    Creating a user-defined parameter type (enum) - https://ninjatrader.com/support/foru...ead.php?t=3420

    If you have any questions on the sample, please let me know.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Aviram Y, Today, 05:29 AM
    0 responses
    2 views
    0 likes
    Last Post Aviram Y  
    Started by quantismo, 04-17-2024, 05:13 PM
    3 responses
    25 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by ScottWalsh, 04-16-2024, 04:29 PM
    7 responses
    34 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cls71, Today, 04:45 AM
    0 responses
    6 views
    0 likes
    Last Post cls71
    by cls71
     
    Started by mjairg, 07-20-2023, 11:57 PM
    3 responses
    217 views
    1 like
    Last Post PaulMohn  
    Working...
    X