読み取り専用

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

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

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

ご参加ください Discord YouTube

Magic Number digits limitation

3件の返信

josecort_trader

購読者, bbp_participant, コミュニティ, sq-ultimate, 顧客, 20件の返信.

プロフィールを表示

8ヶ月前 #292314

こんにちは!

I would like to ask if the ‘MagicNumber’ in SQX could be set as ‘long’ type instead of ‘int’ type.

The reason is that I would like to have more than 10 digits to define a Magic Number when saving a bunch of strategies.

ありがとうございます!

よろしくお願いいたします。,
Jose

添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

tomas262

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

プロフィールを表示

8ヶ月前 #292329

The maximum value for the magic number is 2,147,483,647. It is determined by how MQL language operates

0

josecort_trader

購読者, bbp_participant, コミュニティ, sq-ultimate, 顧客, 20件の返信.

プロフィールを表示

8ヶ月前 #292343

Hi tomas262,

Thanks for you reply.

My question is more related to the number of digits to define the ‘MagicNumber’ than how many numbers can be used for the ‘MagicNumber’.

As you well said,

https://www.mql5.com/en/docs/basis/types/integer/integertypes

//—
<h2>int #</h2>
<p class="”p_Text”"><span class="”f_Text”">The size of the </span><span class="”f_Text”">int</span><span class="”f_Text”"> type is 4 bytes (32 bits). The minimal value is -2 147 483 648, the maximal one is 2 147 483 647.</span></p>
<span class="”f_Text”">2147483647 is a 10 digits number</span>

So the maximum number allowed for the ‘int’ type is defined by 10 digits.

—//

MQL5 code allows to use different types of integers that could be used to define the ‘MagicNumber’. For instance,

//—
<h2>長い #</h2>
<p class="”p_Text”"><span class="”f_Text”">The size of the </span><span class="”f_Text”">長い</span><span class="”f_Text”"> type is 8 bytes (64 bits). The minimum value is -9 223 372 036 854 775 808, the maximum value is 9 223 372 036 854 775 807.</span></p>
<span class="”f_Text”">9223372036854775807 is a 20 digits number</span>

So the maximum number allowed for the ‘long’ type is defined by 20 digits.

—//

<span class="”f_Text”">SQX codes the ‘MagicNumer’ as an ‘int’ type. </span>

<span class="”f_Text”">My request would be that SQX allows user to change the integer type for the MagicNumber as ‘long’ or ‘ulong’ instead of as ‘int’ to extend the number of digits that ‘MagicNumber’ can use.</span>

I am able to do shift to <span class="”f_Text”">’long’ or ‘ulong’ type for ‘MagicNumber’ </span>in MQL editor post exporting the strategies, but I would like that SQX did it.

Thanks for your time and help.

よろしくお願いいたします。,

Jose

0

josecort_trader

購読者, bbp_participant, コミュニティ, sq-ultimate, 顧客, 20件の返信.

プロフィールを表示

8ヶ月前 #292344

Sorry, the previous message does not look good.

int #
The size of the int type is 4 bytes (32 bits). The minimal value is -2 147 483 648, the maximal one is 2 147 483 647.

So the maximum number allowed for the ‘int’ type is defined by 10 digits.

long #
The size of the long type is 8 bytes (64 bits). The minimum value is -9 223 372 036 854 775 808, the maximum value is 9 223 372 036 854 775 807.

So the maximum number allowed for the ‘long’ type is defined by 20 digits.

The feature request would be to use a ‘long’ integer type for the MagicNumber instead of ‘int’ type when exporting the strategies.

ありがとう、,

Jose

0

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