• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

open position on break of previous candles high

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

    open position on break of previous candles high

    Hi there i am new to the forum. First post.

    Currently learning the ninja trader strategy builder and for some reason cant get my current strategy to place orders.

    Below is a photo of my entry conditions.




    and here is the action settings



    Thanks in advanced for any help.

    Jack.

    #2
    Hello Jack,

    Welcome to the NinjaTrader forums.

    To understand why the script is behaving as it is, either placing orders or not placing orders 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.

    This will print to the output window. 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.

    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 helpful to include labels and operators in the print to understand what is being compared in the condition sets.

    Below I am providing a link to videos that demonstrate adding prints to a script to get further information about the behavior of the script.

    NT8 — https://www.youtube.com/watch?v=BA0W...tu.be&t=51m51s

    NT7 — https://www.youtube.com/watch?v=K8v_...tu.be&t=48m35s

    If you are using the Strategy Builder in NinjaTrader 8, you can also build prints in the Actions window under Misc -> Print.

    NT8 Strategy Builder — https://drive.google.com/open?id=1CC...D4JjJgEIwJKv6L

    To copy a script and modify the copy (allowing the original to remain in the Strategy Wizard):

    NT8 — https://www.youtube.com/watch?v=BA0W...utu.be&t=8m15s

    NT7 — https://www.youtube.com/watch?v=K8v_...utu.be&t=5m33s

    It is also helpful to enable TraceOrders and print the order object in OnOrderUpdate.

    TraceOrders - https://ninjatrader.com/support/help...raceorders.htm

    OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

    I'm also including a link to a forum post with further suggestions on debugging a script.

    https://ninjatrader.com/support/foru...956#post671956

    Please add prints to your script and send the output from the script as well as the code used to produce the print and I will assist in analyzing this output to understand the behavior.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Jack,

      Welcome to the NinjaTrader forums.

      To understand why the script is behaving as it is, either placing orders or not placing orders 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.

      This will print to the output window. 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.

      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 helpful to include labels and operators in the print to understand what is being compared in the condition sets.

      Below I am providing a link to videos that demonstrate adding prints to a script to get further information about the behavior of the script.

      NT8 — https://www.youtube.com/watch?v=BA0W...tu.be&t=51m51s

      NT7 — https://www.youtube.com/watch?v=K8v_...tu.be&t=48m35s

      If you are using the Strategy Builder in NinjaTrader 8, you can also build prints in the Actions window under Misc -> Print.

      NT8 Strategy Builder — https://drive.google.com/open?id=1CC...D4JjJgEIwJKv6L

      To copy a script and modify the copy (allowing the original to remain in the Strategy Wizard):

      NT8 — https://www.youtube.com/watch?v=BA0W...utu.be&t=8m15s

      NT7 — https://www.youtube.com/watch?v=K8v_...utu.be&t=5m33s

      It is also helpful to enable TraceOrders and print the order object in OnOrderUpdate.

      TraceOrders - https://ninjatrader.com/support/help...raceorders.htm

      OnOrderUpdate() - https://ninjatrader.com/support/help...rderupdate.htm

      I'm also including a link to a forum post with further suggestions on debugging a script.

      https://ninjatrader.com/support/foru...956#post671956

      Please add prints to your script and send the output from the script as well as the code used to produce the print and I will assist in analyzing this output to understand the behavior.
      Great! Thanks very much for your help.

      Jack

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by faisamtrader, Yesterday, 10:03 PM
      0 responses
      2 views
      0 likes
      Last Post faisamtrader  
      Started by johnnybegoode, Yesterday, 08:11 PM
      0 responses
      2 views
      0 likes
      Last Post johnnybegoode  
      Started by Bionian, Yesterday, 02:47 PM
      2 responses
      19 views
      0 likes
      Last Post Bionian
      by Bionian
       
      Started by RickB60, Yesterday, 01:55 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by filopearson, Yesterday, 01:18 PM
      6 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X