時間によるフィルタリングで困っています
2件の返信
How can i make the ea trade only from :
17 pm to 5 am
Hour > 17 && Hour < 5 am
If the clock is 3 am the ea wont work because its 2 days spans .
So how can i tell ea that if close > open then its another day
like this function
もし(CloseHour>OpenHour) //within the day
{
もし (OpenHour < TimeHour(TimeCurrent()) && TimeHour(TimeCurrent()) < CloseHour)
{
コメント(“Open For Trading”);
戻る(本当);
}
もし (OpenHour == TimeHour(TimeCurrent()))
{
もし(OpenMin<=TimeMinute(TimeCurrent()))
{
コメント(“Open For Trading”);
戻る(本当);
}
戻る(false);
}
もし (CloseHour == TimeHour(TimeCurrent()))
{
もし(CloseMin>=TimeMinute(TimeCurrent()))
{
コメント(“Open For Trading”);
戻る(本当);
}
戻る(false);
}
コメント(“Closed”);
戻る(false);
}
もし(OpenHour>CloseHour) //Spanning two days
{
もし (CloseHour < TimeHour(TimeCurrent()) && TimeHour(TimeCurrent()) < OpenHour)
{
コメント(“Closed”);
戻る(false);
}
もし (OpenHour == TimeHour(TimeCurrent()))
{
もし(OpenMin<=TimeMinute(TimeCurrent()))
{
コメント(“Open For Trading”);
戻る(本当);
}
戻る(false);
}
もし (CloseHour == TimeHour(TimeCurrent()))
{
もし(CloseMin>=TimeMinute(TimeCurrent()))
{
コメント(“Open For Trading”);
戻る(本当);
}
戻る(false);
}
コメント(“Open For Trading”);
戻る(本当);
}
0
Hi, this could work
if ((Hour >= 17 AND Hour = 0 AND Hour < 5)) then Time = OK
0
True Tomas but its just pain for optimizing hours such way . Anyway seems i ll put it like this until now . Thank you
0
2件の返信を表示中 - 1 - 2件目 (全2件中)