Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print strategy settings

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

    Print strategy settings

    Hi there,

    just a quick and easy questions. I was looking through the forum and the help sections, but could not find anything:

    How do I access or print within the strategy code the Data series settings that I have entered when starting a strategy?
    • Price based on (i.e. Last)
    • Type (i.e. Minute)
    • Value (i.e. 10)
    • Instrument (i.e. NQ 06-12)

    For example, if I have several strategies running and would like to print to the output windows, I would need some sort of printing:


    NQ 06-12; minute 10, SMA(10) value: 2631

    ES 06-12, minute 9, SMA(10) value: 1364


    whereas the NQ 06-10 would be the instrument that I run the strategy on, and minute would be the Dataseries Type and 10 the Dataseries Value.



    thank you
    wtmnn

    #2
    Hello,

    Thank you for your post.

    Code:
      Print(Instrument.FullName + ";" + BarsPeriod.Id + " " + BarsPeriod.Value + "," + "SMA(10) value: " + SMA(10)[0]);
    You can find more information on these methods and their available properties from the following links:


    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    627 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X