読み取り専用

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

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

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

ご参加ください Discord YouTube

How to edit code to make SL/TP based on % of entry price

1件の返信

kong_28

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

プロフィールを表示

11年前 #113312

マークさん、こんにちは,

      

          I would like to adjust code for meta trader to make SL/TP based on % of entry price. Is it possible to add or replace

some code from the original SQ template ?  If so, please help me for that code as following condition :

 

For long positions:
Profit target price = Entry price x (1+T/100)
Stop-loss price = Entryprice  x (1 – S/100)
 
For short positions:
Profit target price = Entry price x (1-T/100)

Stop-loss price = Entry price x (1+S/100) 

 

           I will use your code to edit my EA manually.

 

ありがとう、,

Sarids

0

マーク・フリック

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

プロフィールを表示

11年前 #128818

こんにちは,

 

yes, this seems to be correct computation.

 

You can edit it in the function openOrderWithErrorHandling() – there the EA places the order and then its SL and PT.

You can use MQL function OrderOpenPrice() to get the actual entry price.

マーク
StrategyQuantアーキテクト

0

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