読み取り専用

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

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

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

ご参加ください Discord YouTube

How to set SL same as TP? Without using MM?

2件の返信

ジュリアンロブ

顧客、bbp_participant、コミュニティ、61件の返信。.

プロフィールを表示

11年前 #113080

こんにちは。.

 

I’ve been using a formula to get my stop loss which works well.

 

But I’d like to copy that distance in pips for my TP, however I can’t see how to do it. I tried using MM but had some trouble. I also tried for example for long trades;

 

TP; ((Order open price (1000) – Order stop loss (1000)) + (Order open price (1000)))

 

Any help would be appreciated, thanks

 

ジュリアン

0

マーク・フリック

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

プロフィールを表示

11年前 #128251

Julian, it wouldn’t work like this. The problem is that functions OrderOpenPrice() and OrderStopLoss() will return correct values only after the order is already opened.

But you call them as the order is opening, they’ll return zeroes.

 

But it can be easily made using variables.

 

Define a new double type variable which you’ll use to compute SL.

 

In THEN action first use Assign Variable to compute SL value and then store it into this variable.

Then add new Enter at Market/Stop/Limit action and use this variable (or formula based on it) for SL and PT.

マーク
StrategyQuantアーキテクト

0

ジュリアンロブ

顧客、bbp_participant、コミュニティ、61件の返信。.

プロフィールを表示

11年前 #128261

Thanks Mark.

 

I think I get what you’re saying. I found someone else in the forum with a similar issue, in which you described a possible solution, so I adapted it myself and came up with this which works well:

 

 

For long trades: PT= (open (0)) – (Min(low[2],low[1])) + ((ConvertToRealPips) (TakeProfitBuffer))

Where TakeProfitBuffer is a variable I created, default set to 2, or same value as stop loss buffer, 2 pips away from the lowest of the last 2 lows.

 

The same kind of thing can also be used to compute activate trailing stop value, works well 🙂

0

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