Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy analyzer chart, using SetProfitTarget and 1t logic

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

    Strategy analyzer chart, using SetProfitTarget and 1t logic

    Hi,

    I'm having a problem with the strategy analyzer chart. I'm using multiple data series, 1 tick to handle logic and entries, and 2k tick for support. My default first bars context set in the UI is 2k tick, only for the sake of being able to see the 2k chart within the analyzer.

    I'm able to enter a position on the 1t chart via EnterLongLimit(int barsInProgressIndex), however SetProfitTarget looks to work differently without a barsInProgressIndex parameter. ("Should you have multiple Bars objects of the same instrument while using SetProfitTarget() in your strategy, you should only submit orders for this instrument to the first Bars context of that instrument."). As such, I get the desired fill results when setting the tick value within the UI to 1, but then I have no 2k tick visualization in the strategy analyzer chart.

    My question is there any way I can have the first bars context or the tick value in the UI be 1 tick, while still displaying the 2k tick chart within the analyzer?​

    #2
    Hello xepher101,

    Thank you for your post.

    You are correct about SetProfitTarget not having a barsInProgress; the Set() methods are calculated historically on the primary bar series. There is no option to set them to a secondary or other added series. The following post has a more in-depth explanation:


    As for your question about the first bars being set to 1 tick and still displaying the 2000 tick chart, that is not possible with the Set() methods. An option available to achieve the primary series of 2000 ticks, an added series of 1 tick for intrabar granularity, and having Stop Loss/Profit Target orders would be to use OnOrderUpdate() and OnExecution() to submit your stop loss and profit target orders rather than using the Set() methods. We have a reference sample demonstrating how to do so here:


    Using Exit methods for your stop loss and profit target orders will allow you to set a barsInProgressIndex so you could specify the exit orders to be on the added 1 tick series. I recommend reviewing the Advanced Order Handling information in the help guide to assist you with better understanding the reference sample and adjusting your strategy to submit protective orders that use a barsInProgressIndex rather than using the Set() methods. That information may be found here:


    Please let us know if we may be of further assistance.

    Comment


      #3
      Perfect explanation that solved my problem, thank you very much.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      93 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      48 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      31 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      34 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      70 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X