Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Series[0] Realtime and IntraBar

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

    Series[0] Realtime and IntraBar

    Hello to the Forum,

    I would like to use a series in real-time mode.
    If a condition within a bar becomes true, this should be displayed on the next tick with Series[1].
    Unfortunately this does not work.
    For clarification I have written the following code:

    Code:
    counter++;
    testCondSeries[0] = counter == 1;
    if (counter >= 4) counter  = 0;
    
    
    Print(Time[0]
     + "   testCondSeries[0]  " + testCondSeries[0]
     + "   testCondSeries[1]  " + testCondSeries[1]
     + "   counter    " + counter);
    I get the following result:

    Click image for larger version  Name:	Unbenanntes Bild.png Views:	0 Size:	28.7 KB ID:	1104283



    Obviously Series[1] only works for historical data.

    What is the best practice to solve my problem?
    Thanks for your support!

    PS: it's not about backtesting but about the running operation
    PPS: I use Calculate.OnEachTick and work on a minute basis

    #2
    Hello user10,

    The series is going to be synced to the primary by default so if you are not using a 1 tick primary you will be referencing the same primary series minute bar for each new tick.

    You may be able to sync a series to a secondary 1 tick series if you intend to have 1 index per tick rather than per bar.



    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      thanks for the advice.
      I have now changed the data series to 1 tick (AddDataSeries(Data.BarsPeriodType.Tick, 1);
      The strategy was removed from the chart and restarted.
      Unfortunately it still does not work.

      I also don't understand why I need a second data series when working in the tick area.

      Comment


        #4
        hello user10,

        That would not be the same as what I had described. your primary would need to be the 1 tick or you would need to add a synced Series. did you use what is shown in the sample i had linked for syncing a secondary series? the secondary tick series is part of what the sample i linked shows.

        if you use a plot or default series here that is going to be for your primary bars. the alternate is to use a secondary synced Series.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        132 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X