DislikedThe best method for determining a new bar is presented by me. It is important to take into account that with the arrival of a new bar a lot of advisers begin to trade, broker servers are under heavy load and get DOS attack trading programs. The broker server refuses and causes requotes and failures of trade. I recommend to use the time shift and define a new bar not at 00 : 00 but at 00: 05 seconds bool NewBar() { static datetime time=0; if(time==0) { time=Time[0]; return false; } if(time!=Time[0]) { time=Time[0]; return true; } return false; }Ignored
1