TO
    
        
            IsLastBar is not set for indicators that are part of a cBot
            
                 26 Aug 2024, 20:21
            
                    
I have a couple of custom indicators that render chart objects perfectly when used as standalone indicators. I use the IsLastBar property to only perform logic on realtime bars.
When I add the indicators to a cBot, the IsLastBar property is always false and the code block that relies on it is never hit.
For now I have worked around the problem by changing my logic to:
Bars.Count -1 == index
Can you confirm if this is a bug or is the behaviour different to what im expecting when used with cbots?
Thanks

PanagiotisCharalampous
27 Aug 2024, 06:35
Hi there,
Please share the complete code of both the cBot and indicator as well as steps to reproduce this behavior.
Best regards,
Panagiotis
@PanagiotisCharalampous