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

Strategy is not placing trades while it is enabled in live market using a SIM account

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

    Strategy is not placing trades while it is enabled in live market using a SIM account

    Hello:
    I have a strategy that places trades while I run a strategy performance. But same strategy is not placing trades in live market. It is enabled and green color.
    Any setting I need to turn on so I see trades on my chart trader. I am playing this in SIM101 account. Please help.

    #2
    Hello mtamaku,

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

    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 date time of the bar and all values compared in every condition that places an order.
    The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for this action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

    To confirm the State is realtime, please also include the State property in the print.

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

    Further, 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 text file to your reply.

    Below is a link to a support article that demonstrates using informative prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.


    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


      #3
      Hi, But it is placing orders when I run it in strategy analyzer and logically it is placing trades based on my criteria. But in Live, same condition exists but no orders while it is enabled.
      Thanks

      Comment


        #4
        Hello mtamaku,

        Understood, the strategy is not placing orders in real-time.

        The output from the prints and TraceOrders is going to tell us why no orders are being submitted.

        I'll need this to provide further direction.

        Currently, have you enabled TraceOrders?

        If you need assistance creating a print for the condition, I am happy to assist.

        What is the specific condition that submits the entry order that is not being expected at the time you expect?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi, here was the issue..

          Strategy worked at 9:30AM start time and stopped placing trade once reached daily profit limit !!!!
          I started the strategy after 1PM so no trades were being place as market was moving live and strategy worked till profit goal reached in the morning hours.
          I had a time range from 9:30PM to 4PM and was expecting trades till 4PM but profit limit reached in first 1 hour, and trades were shown when I displayed marker and text.

          The other issue was when I filter the trades based on account, it is not showing the trades for SIM101 account that were executed between 9:30AM to 10:00AM today. Not sure why it does not even show the SIM in account filter. It shows last week SIM trades from Friday. This made me think that strategy not placing trades as per logic. Any setting on this to see morning trades in SIM account ?

          Thanks for reply.

          Comment


            #6
            Hello mtamaku,

            Are you viewing the Strategy Performance window to view trades made by the strategy and not the Trade Performance window for all trades placed to an account?


            Have you added the prints and enabled TraceOrders as directed?
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Skifree, 06-17-2024, 06:35 PM
            3 responses
            18 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by sy2023, 09-15-2023, 08:51 PM
            2 responses
            234 views
            0 likes
            Last Post Crusade12  
            Started by kiss987, 05-16-2018, 02:19 AM
            14 responses
            2,871 views
            0 likes
            Last Post bobperez  
            Started by jalley, 03-22-2021, 12:17 PM
            4 responses
            133 views
            0 likes
            Last Post bobperez  
            Started by HGTrader, Yesterday, 02:13 PM
            6 responses
            13 views
            0 likes
            Last Post HGTrader  
            Working...
            X