Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting data from Custom Indicator in My Strategy

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

    Getting data from Custom Indicator in My Strategy

    Hello Support Team,

    I am experiencing an issue with the BetterSwing indicator when used in a strategy. The indicator itself displays correctly on the chart, and all swing calculations appear to be accurate. However, when I call the getter methods (such as GetLastSwing() and GetAllSwings()) from within my strategy, they do not return any instances of mySwing – they consistently return null.

    Key Points:
    1. The BetterSwing indicator works perfectly on the chart.
    2. The getter methods in the strategy fail to return any mySwing instances.

    I suspect this might be due to timing issues related to when a swing instance is considered complete or possibly due to an initialization order. Additionally, perhaps I simply do not fully understand the call architecture, and I would greatly appreciate it if you could explain the underlying cause of this problem.

    Thank you for your assistance.

    Best regards,
    DarthTraderrrrr
    Attached Files

    #2
    Hello darthTraderrr,

    Thank you for your post.

    You may need to call Update() in the property getter to return the up-to-date value.

    Please see the Help Guide page below.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Working...
    X