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

Set Condition - Range of last bar?

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

    #16
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello George21,

    Yes, the MarketReplay data does contain the ask and bid.

    Give it a try. Open a chart to a bid or ask tick series and run the playback.
    I see that it's there, I was just wondering about its accuracy. Everytime I enable "calculate on tick" I cant get a single condition to work right. It just overtrades on single bars with dozens of orders exploding at a time.

    Comment


      #17
      Hello George21,

      This would be a recording of a live stream. It's accurate as Continuum provides data for.


      If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true or the order is being ignored for other reasons.

      To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

      In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar.

      Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

      Also, enable TraceOrders which will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.

      I am happy to assist you with analyzing the output from the output window.

      Run or backtest the script and when the output from the output window appears save this by right-clicking the output window and selecting Save As... -> give the output file a name and save -> then attach the output from both computers to your reply.

      Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
      https://ninjatrader.com/support/foru...121#post791121

      Please let me know if I may further assist with analyzing the output or if you need any assistance creating a print or enabling TraceOrders.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Originally posted by NinjaTrader_ChelseaB View Post
        Hello George21,

        This would be a recording of a live stream. It's accurate as Continuum provides data for.


        If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true or the order is being ignored for other reasons.

        To understand why the script is behaving as it is, such as placing orders or not placing orders or drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

        In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar.

        Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

        Also, enable TraceOrders which will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.

        I am happy to assist you with analyzing the output from the output window.

        Run or backtest the script and when the output from the output window appears save this by right-clicking the output window and selecting Save As... -> give the output file a name and save -> then attach the output from both computers to your reply.

        Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
        https://ninjatrader.com/support/foru...121#post791121

        Please let me know if I may further assist with analyzing the output or if you need any assistance creating a print or enabling TraceOrders.
        Thank you for this. It will take me a little time to work through this but thank you very much for steering me in the right direction.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mestor, 03-10-2023, 01:50 AM
        16 responses
        388 views
        0 likes
        Last Post z.franck  
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        31 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        29 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        22 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Working...
        X