Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Advancing the active or current bar

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

    Advancing the active or current bar

    In my strategy, I am using <IsFirstTickOfBar> when making an entry but there are times that I would like to make the entry on the next bar. Is there a way to advance that bar, I tried nesting <IsFirstTickOfBar> but it did not work for me.

    #2
    Hello galsermil,

    You cannot advance the data or manipulate the data in any way, the way your script processes is a result of how it processes the bar data and incoming data.

    You would have to make your own logic which handles that situation. A simple way would be to use a bool variable. At the time when you see the entry should be submitted you could set the variable to true, on the next bar if the variable is true submit the order. You can also use more complex ways like storing the CurrentBar to check if a number of bars elapsed.

    Comment


      #3
      Thank you. I think I have myself between a rock and a hard place because I am using <IsFirstTickOfBar> in order to get my entry as close to the Open of the bar as possible but the signal to not use that bar is produced during that bar, usually quite early but not always. I suppose that I will have to find my warning at bar[1] or not at all..

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      65 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