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

trade below did not occur

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

    trade below did not occur

    Additionally, I have the following strategy conditions, but for some reason the trade below did not occur. DI Plus crosses Di minus at 11:28, the crosses ADX 1 minute later. The trade should have occurred on the following bar. The time frames are 10AM-3PM. and the condition group is the entry condition (no other trades occurred) so this shouldn't be an issue as it works through the rest of the day. What am i missing on why this trade did not occur?

    Click image for larger version

Name:	image.png
Views:	26
Size:	13.4 KB
ID:	1302352
    Click image for larger version

Name:	image.png
Views:	22
Size:	8.1 KB
ID:	1302354

    Click image for larger version

Name:	image.png
Views:	21
Size:	44.9 KB
ID:	1302353​​

    #2
    Hello ageeholdings,

    I have moved your post into it's own separate thread since it was unrelated to the original question being asked in the thread. Please note, any time you reply to an post, this will go to the person you are working with. Reply instead of creating a new post when you would like to continue investigating an existing inquiry.


    Any time you create a new post, this will create a new inquiry and a new case ticket, which will be answered by the first person available and may not be the person you are previously working with. Create a new post instead of a reply when you have a new question that is unrelated to a previous inquiry. This will allow us to properly track each issue.


    We appreciate your cooperation in this regard.

    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.

    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.

    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 forum post 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.​

    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nicthe, Today, 02:58 PM
    1 response
    8 views
    0 likes
    Last Post nicthe
    by nicthe
     
    Started by percy3687, Yesterday, 12:28 AM
    3 responses
    30 views
    0 likes
    Last Post percy3687  
    Started by SilverSurfer1, Today, 01:33 PM
    0 responses
    10 views
    0 likes
    Last Post SilverSurfer1  
    Started by ETFVoyageur, Today, 10:27 AM
    2 responses
    19 views
    0 likes
    Last Post ETFVoyageur  
    Started by CommonWhale, Today, 01:12 PM
    0 responses
    11 views
    0 likes
    Last Post CommonWhale  
    Working...
    X