PDA

View Full Version : 需要時間功能方面的專家幫助



安亚
07-13-2006 09:57, 09:57 AM
OK. I feel like a real bonehead. For some reason, I simply cannot get my expert working. Essentially, all I want to do is to place an order every night at precisely 3:30 GMT. For whatever reason, MT4 acts as if the hour is set correctly, but, it does funny stuff with the minutes. For instance, I changed the setting to place an order at 15:55, but, it placed it at 15:52.

Does anyone have an idea of what could be happening? If I want an order down to the minute, does the expert need to be on a minute chart?

If someone is willing to take a glance through the code, I'm happy to post it.

Thanks.

安亚
08-18-2023 05:09, 05:09 AM
Did those few minutes get you in at a worse price?
當時市場是如此緩慢,以至於真的沒關係。這只是讓我困惑。除了使用時間函數以外,還有其他方法可以在3:30蠟燭收盤時下訂單嗎?

oxlgot.angot
08-18-2023 06:30, 06:30 AM
OK. I feel like a real bonehead. For some reason, I simply cannot get my expert working. Essentially, all I want to do is to place an order every night at precisely 3:30 GMT. For whatever reason, MT4 acts as if the hour is set correctly, but, it does funny stuff with the minutes. For instance, I changed the setting to place an order at 15:55, but, it placed it at 15:52. Does anyone have an idea of what could be happening? If I want an order down to the minute, does the expert need to be on a minute chart? If someone is willing to take a glance through the code, I'm happy to post it. Thanks. stockwet
stock-y...I believe it does have to be on the minute chart because the bar time is based on the closing minute of the bar. Furthermore, since experts execute on ticks, if the first tick of the 15:55 bar executed at 15:52, it would read your 15:52 bar as your 15:55 bar (since the close of the bar between 15:51 and 15:55 is exactly 15:55). Did those few minutes get you in at a worse price?

安亚
08-18-2023 07:51, 07:51 AM
stock-y...I believe it does have to be on the minute chart because the bar time is based on the closing minute of the bar. Furthermore, since experts execute on ticks, if the first tick of the 15:55 bar executed at 15:52, it would read your 15:52 bar as your 15:55 bar (since the close of the bar between 15:51 and 15:55 is exactly 15:55). Did those few minutes get you in at a worse price?
Now that's interesting. That's not what I thought the problem was. I'm actually using a 30 minute chart and the value I want is 3:30. This actually makes sense. Last night, my expert executed at 3:00. Based on what you said, even though the actual time was 3:01, it treated the tick as 3:30. Does that sum it up?

oxlgot.angot
08-18-2023 09:12, 09:12 AM
現在很有趣。那不是我認為的問題所在。我實際上使用的是30分鐘圖表,我想要的值是3:30。這實際上是有道理的。昨晚,我的專家在3:00執行死刑。根據您所說的,即使實際時間是3:01,它也將刻度線視為3:30。總結一下嗎?
總結起來...就糾正問題而言,很抱歉,我真的不知道...我只是記得我也和我的基於時間的專家碰到了同樣的問題(有些關鍵)一會兒回來。對您而言,最簡單的方法是檢查時間是否大於3:30,以執行交易。這樣,它將在超過3:30小節的下一個刻度執行。您可能會損失一分鐘...但這應該不會對您造成太大影響...對嗎?