読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

時間によるフィルタリングで困っています

2件の返信

gentmat

顧客、bpb_participant、コミュニティ、234件の回答。.

プロフィールを表示

11年前 #113952

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

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

11年前 #131345

Hi, this could work

 

if ((Hour >= 17 AND Hour = 0 AND Hour < 5)) then Time = OK

0

gentmat

顧客、bpb_participant、コミュニティ、234件の回答。.

プロフィールを表示

11年前 #131356

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件中)