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 rdtdale, Yesterday, 01:02 PM
          2 responses
          16 views
          0 likes
          Last Post rdtdale
          by rdtdale
           
          Started by TradeSaber, Today, 07:18 AM
          0 responses
          7 views
          0 likes
          Last Post TradeSaber  
          Started by PaulMohn, Today, 05:00 AM
          0 responses
          10 views
          0 likes
          Last Post PaulMohn  
          Started by ZenCortexAuCost, Today, 04:24 AM
          0 responses
          6 views
          0 likes
          Last Post ZenCortexAuCost  
          Started by ZenCortexAuCost, Today, 04:22 AM
          0 responses
          3 views
          0 likes
          Last Post ZenCortexAuCost  
          Working...
          X