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

Helpful suggestion

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

    Helpful suggestion

    Hello all,
    I currently have a custom working indicator that I'd like to use it's data to influence a custom strategy I am working on but have a few questions before I do.

    *If I wrongly assume something based on what I've read please let me know.

    1) I am not sure if it's best to have your indicator code separate from your strategy code or if it makes more sense just to take your indicator code and put it within the strategy file; any suggestion?

    2) From what I've read it seems there is a limit of what data types can be passed from the indicator to the strategy using the Series tag; am I correct?

    I'm leaning towards putting my indicator code into my strategy file because it seems easier and more concise, as well as, being able to display the indicator side of the code on the chart. I figured I'd update the indicator code within the indicator file so that I can debug and visual see my changes then once I'm satisfied I can just port it over to the strategy.

    Hopefully this wasn't too much rambling; thank you for the help.

    Travis Sloneker

    #2
    Hello Travis,

    Having an indicator set plot values means that the logic can be used for strategies, alerts, and the market analyzer. If you don't have use for these, it would be fine to put the logic directly in the strategy. It's up to you and your preference.


    As far as a know, any variable type can be public to be accessed from a calling host script. These should use the XmlIgnore() attribute if they are basic structs like string, int, double, bool, enum.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by artson, Today, 12:25 PM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Jessejames1964, Today, 01:56 PM
    0 responses
    2 views
    0 likes
    Last Post Jessejames1964  
    Started by bill2023, Today, 01:14 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by waldoalvarez, 03-08-2021, 08:53 AM
    3 responses
    75 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by MarcelMarcel, Yesterday, 06:42 PM
    6 responses
    26 views
    0 likes
    Last Post marcus2300  
    Working...
    X