Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Building a better strategy?

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

    Building a better strategy?

    Just curious if it more efficient to build an indicator into the code of a strategy, or to leave it external and just reference it?
    Are there benefits or burdens to each option?


    #2
    Hello Conceptzx,

    That wouldn't necessarily matter performance wise, calling an indicator is going to take about the same amount of processing that having the logic in the strategy would use. Generally its easier to break parts of your calculations into indicators to simplify the strategies code, the indicator just returns a value or signal to the strategy so the strategy conditions can use that value.

    Comment


      #3
      Understood.

      Does the OnBarClose, OnEachTick, or OnPriceChange then carry from the strategy, or remain default to the indicator?

      Can it be changed through the strategy for each indicator?

      Comment


        #4
        Hello Conceptzx,

        The strategy will set the indicators Calculate setting to match the strategy when called from the strategy so you would want to plan around that. If your indicator uses OnEachTick but the strategy uses OnBarClose that will affect how the indicator works, there are specific ways to get around that but generally its best to design your indicators to match the strategy if you are making new indicators.

        Comment


          #5
          Thank you for the explanation

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          62 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X