読み取り専用

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

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

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

ご参加ください Discord YouTube

取引時間の定義

8件の返信

スカウト2408

購読者、bbp_participant、コミュニティ、8件の返信.

プロフィールを表示

11年前 #113517

Hello Traders,

 

Since I am new to EA programming, especially EA Wizard, I kindly ask for your assistance regarding the following issue.

 

I want the EA to only trade from 10 a.m. CET to 7 p.m. CET. Now my questions regarding EA Wizard:

 

– at first step I would like to code an option where I can choose time restrictions true/false

– second, if time restrictions are TRUE, how can I define the trading time range correctly?

– is it possible to code these conditions with EA Wizard or do I have to add it directly to the source code?

 

Thank you for your answers.

 

マイケル

 

0

マーク・フリック

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

プロフィールを表示

11年前 #129548

yes, it is possible and not that difficult.

 

how to control the option:

 

– create a new boolean variable, name it for example TimeRangeActive. You’ll be then able to control it by changing this variable to true or false

 

– your IF condition could look like this:

 

もし TimeRangeActive = true

and Hour > 10

and Hour < 19

and … other conditions

それから

Enter at market

 

You can use variables for hours too, instead of using fixed numbers.

 

Keep in mind that the times are always your broker times, not CET. So you have to recompute the time to the broker time if he is not using CET time zone.

中 

マーク
StrategyQuantアーキテクト

0

スカウト2408

購読者、bbp_participant、コミュニティ、8件の返信.

プロフィールを表示

11年前 #129575

Thanks a lot for your detailed reply, Mark.

Your support is highly appreciated!

 

よろしくお願いいたします。,

マイケル

 

0

daveM

サブスクライバー、bbp_participant、コミュニティ、カスタマー、sq-ultimate、108件の返信.

プロフィールを表示

10年前 #134911

In Marc’s post he shows

 

IF TimeRangeActive = true

and Hour > 10

and Hour < 19

 

Could I use that to optimize for best hours to trade? (assigning variables)

0

daveM

サブスクライバー、bbp_participant、コミュニティ、カスタマー、sq-ultimate、108件の返信.

プロフィールを表示

10年前 #134912

Update

 

I did use that and it is working well.

 

BUT, I did not see the first line ‘If TimeRangeActive = True’, not sure where to find that one.

 

Maybe that is from older version of the software.

0

Tomas Matejka

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

プロフィールを表示

10年前 #134932

Dave, Mark defined this variable TimeRangeActive while setting it to boolean type i.e. True or False

 

You can optimize trading time window. Instead of using 10 and 19 fixed values just create variables ‘startTime’ and ‘endTime’ and use them in your condition. Now you can optimize it in MetaTrader.

Don’t forget to add a condition into your trading rule which says ‘startTime < endTime'. This way you ensure everything works correctly

 

Let me know if you need me to create an example

0

daveM

サブスクライバー、bbp_participant、コミュニティ、カスタマー、sq-ultimate、108件の返信.

プロフィールを表示

10年前 #134939

What I did seems to be working so far, I have optimized quite a few times and results seem fine.

 

ありがとう

0

デニスド

カスタマー、bbp_participant、コミュニティ、3件の返信。.

プロフィールを表示

10年前 #135000

tomas262, I would appreciate an example of setting this up for time range trading.  

 

ありがとう

0

Tomas Matejka

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

プロフィールを表示

10年前 #135008

Hi, no problem. Created one for you. It enters a position in a specified time range. In this case I set 9 o’clock start and 9 o’clock end so it trades only between 9:00 and 9:59

ファイル TimeRange.sqw

0

8件の返信を表示中 - 1 - 8件目 (全8件中)