読み取り専用

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

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

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

ご参加ください Discord YouTube

How to code manual pip value as input variable

6件の返信

RuuddeHeer

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

プロフィールを表示

9年前 #116761

こんにちは、,

 

Thank you for the productdevelopment so far. Currently i need an input variable which can enter a manual pip value. For instance the EUR\USD pip value is 0.00001

 

A pip value for the German30 is 0.5.

 

Is it possible to code an input variable for the pip value which is defined per symbol. Forex are 5 or 3 digit pip values,  Indices pip value differ.

 

Thanks in advance for reading and sharing.

 

Ruud de Heer

0

Tomas Matejka

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

プロフィールを表示

9年前 #142840

こんにちは,

 

you can create an input variayble type double and set to 0.0001 if you need. Let me know your intentions how you need to use this variable I can create an example for Wizard

0

RuuddeHeer

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

プロフィールを表示

9年前 #142868

こんにちは、,

 

Goal is to be certain that the resolution of the symbol in digits is correct. I want to avoid invalid stoploss or take profit levels when the order is modified as soon as a trade is executed.

 

For instance with EUR\USD the resolution is 5 digits. A pip value is 0.00001 A pip value with USD/JPY is 0.001 A pip value on the Dax30 is 0.5. I want to avoid rounding errors or hacking. I believe that a broker or EA can mess things up with setting the correct pip value per symbol.

 

Therefor an input variable for the manual pip value would be excellent. Unfortunately i am unknown how to code this in a strategy, with the correct initalisation and declaration of the correct variables and method.

 

Thanks in advance for the help.

0

Tomas Matejka

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

プロフィールを表示

9年前 #142972

こんにちは,

 

you might use ConvertToRealPips function using parameter (1 pip). It will provide correct decimal place for a symbol

ファイル realPips.jpgrealPips.jpg

0

RuuddeHeer

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

プロフィールを表示

9年前 #143253

Thanks for the reply.

 

I will check the funtion out. I believe the coef and rDigits variable is written for 2 digit and 4 digit assets. With the (MarketInfo(Symbol(),MODE_DIGITS) code the digits are retrieved per symbol. For fractional pips i will test if a double as input variable helps in the default setup.

 

As a newbie in coding i will trace the variables if EA wizard by default is suited for fractional pips.

0

mnlpad

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

プロフィールを表示

9年前 #143270

こんにちは、,

 

My EA do not show results i think that this is affecting. How can i set this to 5 digits asset?

 

 double realDigits = Digits;
   if(realDigits > 0 && realDigits != 2 && realDigits != 4) {
      realDigits -= 1;
   }
 
   gPointPow = MathPow(1, realDigits);
   gPointCoef = 1/gPointPow;

0

Tomas Matejka

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

プロフィールを表示

9年前 #143437

こんにちは,

 

EA should be working with 5 digits. Can you attach the mq4 or send me to [email protected]?

0

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