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 Taddypole, 04-26-2024, 02:47 PM
    2 responses
    14 views
    0 likes
    Last Post Taddypole  
    Started by futtrader, 04-21-2024, 01:50 AM
    6 responses
    58 views
    0 likes
    Last Post futtrader  
    Started by sgordet, Today, 11:48 AM
    0 responses
    4 views
    0 likes
    Last Post sgordet
    by sgordet
     
    Started by Trader146, Today, 11:41 AM
    0 responses
    5 views
    0 likes
    Last Post Trader146  
    Started by jpapa, 04-23-2024, 07:22 AM
    2 responses
    22 views
    0 likes
    Last Post rene69851  
    Working...
    X