Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Capturing Log File message into Ninjascript

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

    Capturing Log File message into Ninjascript

    Hello NinjaTrader Community:

    Is there a way to capture the log file messages into Ninjascript? Why I ask is sometimes I get an error "stop price can't be changed above the market.....". I would like my script to act upon this error.

    Thank you

    #2
    Hello geekodude,

    There is not a way to capture the general log.

    If your script is having rejected orders we generally suggest to just try to fix that directly instead of handing rejections yourself. The error you mentioned is caused by the pricing used for the order. If you are placing a target too close to the active price then you run the risk of the order price being on the wrong side of the market when you submit it. Using a further away price could resolve this error.

    If you feel comfortable with handling every reject that the strategy may have you can look into disabling rejection handling: https://ninjatrader.com/support/help...tsub=rejection

    This would be a more advanced task as you need to make conditions for any type of rejection that your strategy may encounter, this also opens up the possibility that the strategy will place unwanted trades or do unwanted actions after a rejection as the strategy is not disabled. You would want to closely monitor the strategy while using this option.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tony_28217, Today, 07:04 PM
    0 responses
    3 views
    0 likes
    Last Post tony_28217  
    Started by flybuzz, Today, 10:33 AM
    1 response
    9 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by spencerp92, 10-10-2023, 09:56 AM
    4 responses
    304 views
    0 likes
    Last Post flybuzz
    by flybuzz
     
    Started by samish18, Yesterday, 10:13 AM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by Austiner87, Today, 05:02 PM
    0 responses
    7 views
    0 likes
    Last Post Austiner87  
    Working...
    X