Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculation Sum Of Previous Bars

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

    Calculation Sum Of Previous Bars

    Hello,

    I'm currently developing a strategy that relies on placing a trade if the previous (x) amount of bars = (y) amount of points, or ticks. As I'm not super familiar with code, I'd like to develop this in the Strategy Builder.

    The sequence would work like this (as an example):
    Calculate total amount of price change in a single direction over previous 5 bars;
    If price changes greater than 5 points, then look for a following bar that is greater than 5 points in the opposite direction
    If greater than 5 points in opposite direction, take trade in that same direction
    I would like to account for the possibility that the 5 point initial move happens in either 5 bars, or could happen in a single bar, or 2 bars, or 3 bars, or any variation, but just that it occurs within (x) number of bars)
    The trade in the opposite direction has to account for the direction being reverse to the previous move (calculating price change of move to >= 5 points)

    I would be open to doing this in either a (x) number of bars calculation, or using the range indicator to calculate the sum of price change in a single direction occuring over (x) number of bars

    Is this possible to do without using code and just conditioning for this pattern or movement in strategy builder? Trade will be taken at bar open, and calculation should come from bar close rather than intrabar, using high and low (total bar).

    Any help would be super appreciated.
    Thanks!

    #2
    Hello wisdomspoon,

    In the strategy builder that would be a fairly difficult task. This would be a good case to use an indicator and plot the result.

    The builder is fairly limited to doing price conditions so if you wanted to check something for a period of time you would need to make individual conditions checking the BarsAgo you wanted to cover a span of time.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    63 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 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