Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Having an issue with CrossBelow and CrossAbove

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

    Having an issue with CrossBelow and CrossAbove

    I am using COBC=True
    I have the lookback set at 1.
    I look to check the crossabove and crossbelow of zero.

    It is missing zero crosses.

    I set the lookback to 2

    Now I get double triggers in one direction before getting a trigger in the opposing direction.

    I have never used these before, what am I missing ? I know I can take out the double trigger with a directional flipflop but I would like to understand what is up.

    #2
    I'd be printing out values that you are comparing and seeing what's up.

    Something sounds wrong in the code.

    Comment


      #3
      Hello,

      Thank you for the post.

      I would agree with Sledge on this, you would likely need to print out the values you are using in the Cross syntax to see what specifically is happening.

      For example, if you had a Series and a Price, you could do the following print outside the cross condition:

      Print(Time[0] + " " + MySeries[0]);

      This could help determine what the value was on each bar to see if the condition is at fault or if the value was unexpected at the time.

      If you are still having difficulty after adding prints, could you provide the syntax being used for further review?

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #4
        Sledge and Jesse , It turns out the "Problem" was not a Real problem. It was a manufactured problem by Market Replay. I was using Market Replay to test my code. I put in print statements and the Prints were being executed but the alerts were not. Turns out for what ever reason, MR does not execute 100 percent correctly at x500. If I slow down to x100 the alerts are all triggered. I even set the rearm down to zero with priority.High but it made no difference. I still skipped certain alerts at x500. Regardless, it works, just a testing error.

        Thanks for the inputs.

        Comment


          #5
          Can you post some non-secret code that fails at 500x?

          I'll fire up an nt7 and have a look.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Tim-c, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          2 views
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,771 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          31 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          945 views
          0 likes
          Last Post spwizard  
          Working...
          X