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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    475 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    315 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    253 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    340 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    305 views
    0 likes
    Last Post CarlTrading  
    Working...
    X