読み取り専用

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

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

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

ご参加ください Discord YouTube

機能「OrdersAveragePrice」に関するヘルプ

1件の返信

webo

登録者、bbp_participant、コミュニティ、5件の返信。.

プロフィールを表示

11年前 #112976

こんにちは,

I’m trying to close a group of orders together and was thinking about using the function OrdersAveragePrice. However, it seems the parameter for that function is only a single order id (for example 1000) and I cannot set a group of orders I want to get the average open price from. I mean, if I want to use that function to get the average open price for a group of orders, how should I proceed? I guess I cannot open multiple orders with the same order id (example 1000). How can we use the function OrdersAveragePrice?, Can you please post an example?

よろしくお願いします。.

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

0

マーク・フリック

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

プロフィールを表示

11年前 #127889

こんにちは,

 

I’m not sure what you want to achieve, but you can do it manually. Use OrderOpeningPrice() and mathematic funcitons to compute average open price if you need it.

 

For example

 

average price = (OrderOpeningPrice(1000) + OrderOpeningPrice(2000) + OrderOpeningPrice(3000)) / 3

 

You can create an equation like this using simple  Addition and Division functions, and assign a resulting value to a variable. I’m attaching an example, without actual orders opening.

ファイル Sample1.sqw

マーク
StrategyQuantアーキテクト

0

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