I need to react and detect only and only the last bar on a chart. Problem is when I load my chart, the condition is detected and a process is execute
Code: Select all
If barstatus= 2 and LastBarOnChart then begin // this is the begining of a new bar
BarCompleted = "BC";
If you test it, the condition will return true before the completion of the actual bar. Just starting the signal code engage the process and conditions are tested. I want to test only after the entire graph as been loaded and only for the last bar after the initialization.
The fact that lastbaronchart is detected while the chart is initialized cause some data to be sent to Excel. This process is very slow and create an error
Hope I'm clear enough