Hi, I'm trying to use the most up-to-date streaming Close with the following code. Once attached to a chart and set to stream during trading I should be able to see the header text. But it's not showing. 
    
    
    
    CODE:
if (Bars.HasStreamingBar) { Bars.Close[Lastbar] = Bars.Close.StreamingValue; DrawHeaderText("Real Time", WLColor.White, 12); }
        Rename
    
QUOTE:
Bars.Close[Lastbar] = Bars.Close.StreamingValue;
What's the purpose of trying to overwrite the last bar (e.g. yesterday) with the partial bar's close (e.g. today's)?
        The goal is to get the most up-to-date streaming Price.
Bars.HasStreamingBar does not seem to work. Since I run it during streaming period and the condition is not true. What's listed is a translation from WL6 code that worked.
I welcome the correct way to accomplish the task in WL8.
P.S> The resolution is not day but minutes.
    
    
Bars.HasStreamingBar does not seem to work. Since I run it during streaming period and the condition is not true. What's listed is a translation from WL6 code that worked.
I welcome the correct way to accomplish the task in WL8.
P.S> The resolution is not day but minutes.
        What's your streaming provider? Bars.HasStreamingBar should work if the streaming provider is IB, TD or Alpaca.
    
    
        It is IB.
Is there something I can try/test?
    
Is there something I can try/test?
        WL isn't set up to work with a streaming price in a strategy. At the point in time that a strategy fires and executes, the closing price will be equal to whatever the current streaming price is anyway.
    
    
        Please note above - the strategy is "attached" to a streaming chart during trading hours.
The condition below is not true. I'm using WL8 build 12 with IB provider build 8
    
The condition below is not true. I'm using WL8 build 12 with IB provider build 8
CODE:
if (Bars.HasStreamingBar) { DrawHeaderText("Real Time bar", WLColor.White, 12); }
        Worked for me.  Maybe you didn't wait for the chart to finish it's first streaming interval?
    
    
            Your Response
            
            Post
        
        
        
    
            Edit Post
            
        
        
        
    
            Login is required