I have a question regarding multicharts. I use an automated strategy that has a considerable lag time. After hours on the chat with tech support: we realized that this is due to the fact that the strategy references some symbols that take a while for the next tick to update. So I changed my code from executing on the "next bar" to executing at the close of the "this bar". This improved the situation however, there is still some lag. To be specific there is about a .5-1.5 second lag. This is enough to produce sizable slippage. When I execute the trade manually on the chart trading using the bar countdown at :01 there is almost never slippage. In other words I almost always get the closing price.
So...I want to have the trade execute 2 seconds before the bar closes. For example, if the condition is met and the bar closes right before noon I would like the trade to execute at 11:59:58. This way it would compensate for the lag. I have tried many of the time functions in the reserved words (using intrabar order generation) to execute the trade but have not had success. I am using multicharts 64 version 9.0 (power language). My broker is interactive brokers. I am trading the ES mini futures.