Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

accessing indicator values

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

    accessing indicator values

    Hello i have an indicator i use and am setting this up to return some key values to be used in a strategy.

    If the indicator has values calculated within OnRender - given i will be invoking the indicator from a strategy is it advised/essential i move some of those calculations (they are not heavy calcs as i realise onrender should be light on calculation) to onbarupdate -

    ie calling the indicator from a strategy will mean the onRender portion will not be active or called?

    thanks

    #2
    Hello soulfx,

    Indicators added to a strategy will only process OnRender() if the indicator is added with AddChartIndicator().

    This can be tested with a print in an empty indicator with OnRender() overridden, and adding that indicator to a strategy with and without using AddChartIndicator() to observe the results.

    However, it is generally advised to perform these sorts of calculations in OnBarUpdate() as much as possible such that the data can be synchronized and kept up to date. Since OnRender() is calculated asynchronously to OnBarUpdate(), the values obtained from these calculations may not be guaranteed.

    Please let me know if I can be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X