• 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

Use indicator triggers in the strategy

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

    Use indicator triggers in the strategy

    I want to start "small" might be enough for you to push me in the right direction.

    My problem is that I get several more triggers from the indicator than it supposed to give.
    Explanation:
    I have a custom indicator. If gives some triggers couple of times a day.
    I have defined a public variable array that stores the triggers. Indicator works and the print command shows exactly the time and details of the true triggers.
    Now I have created an empty strategy. The only thing it has at the moment is OnBarUpdate it waits for the trigger of the indicator and prints a message with the data. (Bar number,time etc)
    This is the bases for the strategy.
    . In the display window I see the print lines from the strategy as well as from the indicator. But I get more lines from the strategy then the indicator.
    At times of day where there are no indicator triggers.

    Where to look?

    #2
    Hello dadarara,

    I would suggest adding print statements to check whether your conditions are becoming true. I’ve provided a link to a youtube video which covers an example of using prints to understand behavior:

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

    I’ve provided a link covering debugging which you may find helpful.
    Debugging: http://ninjatrader.com/support/forum...ead.php?t=3418

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      I did all that. I have print commands in all places. That's the funny part. In the indicator I get all true triggers and I see the print lines showing that. But in the strategy print lines I get extra triggers. I hope you understand. The strategy doesn't do anything yet. It simply prints out the triggers it gets from the indicator. It looks like it prints triggers that are not received from indicator.
      Attached Files
      Last edited by dadarara; 07-25-2017, 10:46 AM.

      Comment


        #4
        Hello dadarara,

        In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

        You can also contact a professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Erwin Beckers, 11-04-2018, 02:39 AM
        4 responses
        69 views
        2 likes
        Last Post brucerobinson  
        Started by ntbone, Today, 01:25 AM
        0 responses
        5 views
        0 likes
        Last Post ntbone
        by ntbone
         
        Started by bomanpbm, Yesterday, 09:27 PM
        0 responses
        5 views
        0 likes
        Last Post bomanpbm  
        Started by tgn55, Yesterday, 08:47 AM
        0 responses
        11 views
        0 likes
        Last Post tgn55
        by tgn55
         
        Started by ballboy11, 05-04-2019, 10:26 AM
        6 responses
        61 views
        0 likes
        Last Post Kermit
        by Kermit
         
        Working...
        X