Run on chart csroll ?

 

I need a little code to run not on every Tick but each time the chart is updated, e.g every 1M.

Ideas?

 
DayTrader:

I need a little code to run not on every Tick but each time the chart is updated, e.g every 1M.

Ideas?


Run on Time[0] <>Time[1]

I'm checking on it...

 

chart updates/candle can change, each incoming data tick.

u mean 'new' bar appears?

if interested 1st incoming data tick for the 'next' bar, ie, when Time[0]<>Time[1] then... u got the answer ;)

as docs say:

datetime Time[]

Series array that contains open time of each bar of the current chart. Data like datetime represent time, in seconds, that has passed since 00:00 a.m. of 1 January, 1970.
.

also do consider great search ability at top right of every page. there is massive amt info on "new bar"

.

please see Identifying the open and close of a bar in an EA

Reason: