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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    161 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    309 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    349 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X