読み取り専用

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

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

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

ご参加ください Discord YouTube

時間ではなくバー単位で範囲を定義する

12件の返信

DM00

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

プロフィールを表示

10年前 #115455

Good day everyone,

 

I would like to set a strategy that is range based to enter a trade. I see in EA wizard where ranges is basically based on start time and end time. However I would like to setup range that is based on number or bars instead. 

For example: to enter a sell order if EMA has a certain value for X bars(or X shifts if you please). 

So If I want my expert advisor to enter a sell market order when the value of EMA for the past 10 bars is less than that of the current EMA value (shift 0), I have no idea how to go about it. Instead I have to use this long tedious process:

 

もし 

EMA (1) < EMA (0)

そして 

EMA(2) < EMA (0)

そして

EMA(3) < EMA (0)

そして 

EMA(4) < EMA (0)

そして 

EMA(5) < EMA(0) ……… and so on. 

 

You can imagine how long and tedious this would be if i were to use larger periods, like 20 or 30 bars, rather than having one strategy that says ‘last 20 EMA values less than current EMA value’.

 

I hope you understand what I’m trying o explain. Please Help

 

ありがとう

 

ディーン

 

 

0

しきい値

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

プロフィールを表示

10年前 #138885

DM00

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

プロフィールを表示

10年前 #138911

Hi again Threshold. 

 

 

Where is this ‘counter’ created? Is it written in SQ EA wizard?

0

Tomas Matejka

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

プロフィールを表示

10年前 #138912

Yes, you define the counter as a new variable

0

DM00

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

プロフィールを表示

10年前 #138913

Forgive me I don’t know anything about coding. When defining the counter does it matter how I name it or does it have to be in the format ‘abcdefCounter’ with counter at the end?

0

Tomas Matejka

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

プロフィールを表示

10年前 #138914

The name does not matter. You just use this variable to store a calculated value

0

DM00

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

プロフィールを表示

10年前 #138917

Hope I’m not bothering you too much. I’ll give you a specific example to help me. 

 

I want to set up a strategy where SQ will enter a long market order once the following conditions are met:

 

1. EMA has been above SMA for the past 20 bars and 

2. SMA (1) crosses above EMA(1)

 

Its very hard to put in EMA above SMA individually for 20 bars plus I can’t optimize the number of historical bars( for eg if i ant to change it to 15 or 50 historical bars)

 

またありがとうございます

 

ディーン

0

DM00

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

プロフィールを表示

10年前 #138918

This is the example I’m referring to. A rather tedious task especially to optimize or correct errors and yet this is just a small portion of what I’m trying.
 
 
file:///Users/deanmolyneaux/Desktop/Screen%20Shot%202016-08-22%20at%2011.00.09%20PM.png

0

DM00

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

プロフィールを表示

10年前 #138919

Sorry the file didn’t attach in the previous thread 

0

DM00

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

プロフィールを表示

10年前 #138920

Here is the file.. again

0

Tomas Matejka

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

プロフィールを表示

10年前 #138925

こんにちは,

 

you don’t need to “hard-code” all the bars. Thats what is a counter for. I will create an example for this and upload here

0

DM00

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

プロフィールを表示

10年前 #138933

Thank you. I am looking forward to it.

0

Tomas Matejka

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

プロフィールを表示

10年前 #138937

こんにちは,

 

find the example attached. Both EMA and SMA have the same period setting

0

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