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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X