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

Swing strategy

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

    Swing strategy

    Hello, im doing a strategy with swings indicator to look for divergences in macd. The problem is that i cant draw the line that I want, because it does not draw. Can you tell me why it dont draw?. Thank for your help.
    Attached Files

    #2
    Hello Auxtin Maquieyra,

    Thank you for opening the thread.

    If a certain action of our strategy is or is not happening as we would expect it, the code will need to be debugged to determine why that action is or is not happening. This involves adding prints to the strategy to observe the logic as it is processing. Prints can be seen in the NinjaScript Output window.

    Debugging tips for NinjaScripts can be referenced here - https://ninjatrader.com/support/foru...ead.php?t=3418

    I have also included a demonstration showing how debugging prints can be added in the Strategy Builder - https://www.screencast.com/t/8uvjfM8h

    Some questions we will need to answer when debugging:
    1. Is the Draw method getting hit? This can be checked by placing a print beside the Draw method
    2. Are the conditions that control the Draw method becoming true? We can check this by placing prints for the variables used to evaluate the condition before that condition is reached.


    I may also suggest to first create a very simple line in a new script and then to scale up your logic once you have a simple line drawing.

    I recall you had a similar question yesterday that involves debugging. Were you interested in debugging services? If so, please let us know and we can have a representative of our EcoSystem provide you information on NinjaScript Consultants.
    JimNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello Auxtin Maquieyra,

      Thank you for opening the thread.

      If a certain action of our strategy is or is not happening as we would expect it, the code will need to be debugged to determine why that action is or is not happening. This involves adding prints to the strategy to observe the logic as it is processing. Prints can be seen in the NinjaScript Output window.

      Debugging tips for NinjaScripts can be referenced here - https://ninjatrader.com/support/foru...ead.php?t=3418

      I have also included a demonstration showing how debugging prints can be added in the Strategy Builder - https://www.screencast.com/t/8uvjfM8h

      Some questions we will need to answer when debugging:
      1. Is the Draw method getting hit? This can be checked by placing a print beside the Draw method
      2. Are the conditions that control the Draw method becoming true? We can check this by placing prints for the variables used to evaluate the condition before that condition is reached.


      I may also suggest to first create a very simple line in a new script and then to scale up your logic once you have a simple line drawing.

      I recall you had a similar question yesterday that involves debugging. Were you interested in debugging services? If so, please let us know and we can have a representative of our EcoSystem provide you information on NinjaScript Consultants.
      Yes i was asking yesterday! Okey I understand i will go on that! Thank you for helping me.

      Comment


        #4
        Hello Auxtin Maquieyra,

        NinjaTrader has a network of third-party programming consultants who can help you debug your NinjaScript files. You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
        You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

        This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

        Let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by KenneGaray, Today, 03:48 AM
        0 responses
        2 views
        0 likes
        Last Post KenneGaray  
        Started by thanajo, 05-04-2021, 02:11 AM
        4 responses
        470 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by aa731, Today, 02:54 AM
        0 responses
        4 views
        0 likes
        Last Post aa731
        by aa731
         
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        10 views
        0 likes
        Last Post Christopher_R  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        166 responses
        2,237 views
        0 likes
        Last Post sidlercom80  
        Working...
        X