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 llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X