Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATR Stop

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

    ATR Stop

    I have just started trying to code a strategy. I am trying to go LONG when close crosses over the ATR stop using the SuperTrend indicator listed in the forum. When the close crosses below the ATR stop exit the
    LONG.

    It compiles.

    When I apply it to the chart, it completes the first entry at the start of the data series, Futures contract, then it does not close when close crosses below the ATR stop. It closes at the EOD.

    Any one willing to help me get started? See attached code.

    ATRSTOP.cs

    #2
    Can you post the indicator as well? Thanks ...

    You just have entry orders defined in your code; I'll be able to investigate more closely if you can post the indicator, too.

    Comment


      #3
      See attached file. SuperTrend.cs

      Comment


        #4
        rtj4201, please retry without any CalculateOnBarClose references in your indicator / strategy codes.

        Comment


          #5
          How do you do that? remove calculate on bar close?

          Comment


            #6
            You would need to remove those lines from the Initialize() methods of your indicator and strategy, then recompile the studies, reapply them fresh and recheck.

            Comment


              #7
              why is that keeping it from working correctly?

              Comment


                #8
                rtj4201, there is currently a known issue referencing indicators that have a hardcoded CalculateOnBarClose setting.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                649 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                576 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X