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

Log(*account*, LogLevel.information);

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

    Log(*account*, LogLevel.information);

    I am writing some additional info to the log during OnPositionUpdate().

    Typically, I am running one version of the same strategy "live" and another version on "Sim101", and both are recording to the Log at the same time.

    I want to add an identifier to the string being written to the Log so that I can distinguish which Log entry is coming from "live", and which is from "Sim101" ...

    What do I need instead of *account* in the following?

    Code:
     
    Log(*account*, LogLevel.information);
    Last edited by AnotherTrader; 09-21-2012, 06:38 AM.

    #2
    Hello AnotherTrader,
    You can use the below unsupported code to print out the account name.

    Code:
    Log(Account.Name, LogLevel.information);
    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Graci117, Yesterday, 11:40 PM
    0 responses
    5 views
    0 likes
    Last Post Graci117  
    Started by BIOK.NT, Yesterday, 01:56 PM
    2 responses
    11 views
    0 likes
    Last Post BIOK.NT
    by BIOK.NT
     
    Started by i2ogu3, Yesterday, 11:31 PM
    0 responses
    4 views
    0 likes
    Last Post i2ogu3
    by i2ogu3
     
    Started by RDTrader16, Yesterday, 10:19 PM
    0 responses
    10 views
    0 likes
    Last Post RDTrader16  
    Started by gemify, 03-08-2023, 08:02 AM
    9 responses
    150 views
    0 likes
    Last Post culpepper  
    Working...
    X