読み取り専用

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

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

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

ご参加ください Discord YouTube

Multiple ATR trailing stops

9件の返信

nolte

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

プロフィールを表示

10年前 #115119

I’m trying to create an EA that uses multiple ATR stop losses.

 

1: Stop trails up to breakeven, using “fast ATR” stop loss, and holds.

2: Stop trails up farther when “slow ATR” is greater than breakeven.

3: Stop moves back and trails up using “trend ATR” once “trend ATR” is greater than breakeven.

 

I’ve tried to follow the Trailing Stop Simulation the best possible, the problem is it will only move the stop loss using whole numbers, 102, 103, 104… ect. Any help would be appreciated.

ファイル atrstops.pngatrstops.png

0

Tomas Matejka

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

プロフィールを表示

10年前 #136941

Change variable type for stop prices from “int” to “double”. It should help

0

nolte

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

プロフィールを表示

10年前 #136953

Thank you tomas, that solved the whole number problem.

 

Now there’s a new problem, the simplest way to explain it is with an example:

 

GBP/USD stoploss should be at 1.9206, my EA is trying to place it at .00019206. With the JPY pairs it is placing it at 1.0232 instead of 102.32.

 

I have double checked my settings and conditions and I just don’t see anything wrong. It seems to be following all the conditions correctly because 1.9206 is the correct stoploss, it just has the decimal places for the pips wrong (see the picture). Thank you for your help!

 

ファイル stoploss.pngstoploss.png

0

Tomas Matejka

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

プロフィールを表示

10年前 #137017

わかりました、確認してご連絡いたします。

0

Tomas Matejka

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

プロフィールを表示

10年前 #137025

I have noticed that you also define stop-loss incorrectly. The stop range is supposed to be in pips but when you multiply ATR x factor it is like 0.002 x 2. The result is not in pips. You would have to use ConvertToPips(ATR x factor) to get SL pips range value

ファイル converttopips.pngconverttopips.png

0

nolte

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

プロフィールを表示

10年前 #137064

I will make the changes and check it.

0

nolte

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

プロフィールを表示

10年前 #137103

I made the changes but it doesn’t seem to work right, the only way it works correctly is (ATR x factor).

0

Tomas Matejka

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

プロフィールを表示

10年前 #137170

Ok, will try to do changes to make it work

0

Tomas Matejka

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

プロフィールを表示

10年前 #137320

こんにちは,

 

the problem is when you set price for “Move SL To” as “Fixed Price”. There is a bug that causes the calculated price to be multiplied. Hence the incorrect final price.

To solve this you need to define price using formula as shown in edited example of yours. Look at the attachment.

0

nolte

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

プロフィールを表示

10年前 #137366

Thank you, I’ll check it out.

0

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