エキスパート: Return Strategy

 

Return Strategy:

指値買い及び指値売り注文を使用します。指値注文のグリッドです。

Return Strategy

作者: Vladimir Karputov

 
Alexander Kamyshanov:
こんにちは、どのように保留中の注文の 寿命の代わりに、数分後に一度価格から一定のピップ数で価格の後ろにその一定の動きを作るには?

最初に:あなたは、少なくともWordを介して質問のテキストを実行する必要があります - このアクションは、テキストを修正し、適切な場所に句読点を追加します...

 

バージョン1.001 -LotsOrRisk 関数を修正しました。

ダウンロードはリターン・ストラテジー

 

ウラジミールさん、
訂正ありがとうございます。

合計利益関数(ポイント)は、目標利益や最小利益と同じ機能を持っていないと言えますか?

 
Edviao:

ウラジミールさん、
訂正ありがとうございます。

合計利益関数(ポイント)は、目標利益や最小利益と同じ機能を持っていないと言えますか?

EAには「目標利益」と「最小利益」がありません。


答えの探し方:入力パラメータ「合計利益(pips)」を取り、どの変数がそれを担当して いるかを見てください:

input ushort   InpTotalProfit    = 100;      // 利益の合計(単位:pips)


...InpTotalProfit'の最初の出現を 探す。

   ExtTotalProfit    = InpTotalProfit  * m_adjusted_point;


...次に'ExtTotalProfit'の最初の出現を探す。

//---
   if(CalculateTotalProfit()>=ExtTotalProfit)
     {
      bln_close_all=true;
      return;
     }


...あとは'CalculateTotalProfit()'関数を調べるだけだ ...

 
宿題をありがとう、ウラジミール!
 

こんにちは!

テスト中にログにメッセージが表示される理由は何でしょうか?Expert Advisorの設定は デフォルトです。

2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21783 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21795 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Buy Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Sell Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.968 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.968 2021.01.11 10:57:26   #3  Sell Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.968 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.968 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.969 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.969 2021.01.11 10:57:26   #3  Sell Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.969 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 
2021.10.30 10:20:44.969 2021.01.11 10:57:26   CTrade::OrderOpen: Invalid expiration type
2021.10.30 10:20:44.969 2021.01.11 10:57:26   #3  Sell Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Code of request result: 10022
2021.10.30 10:20:44.969 2021.01.11 10:57:26   code of request result as a string: invalid expiration
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Deal ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Order ticket: 0
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Volume of deal or order: 0.00
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Price, confirmed by broker: 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current bid price: 1.21782 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Current ask price: 1.21794 (the requote): 0.00000
2021.10.30 10:20:44.969 2021.01.11 10:57:26   Broker comment: 

ありがとうございます。

 
ORDER_TIME_SPECIFIED' がサポートされていないことを示す。
 
Vladimir Karputov 'ORDER_TIME_SPECIFIED'はサポートされていないということです。

誰に、何にサポートされていないのですか?

よろしく、ウラジミール。

 
MrBrooklin #:

誰に、何を支持されていないのですか?

失礼ながら、ウラジーミル。

取引サーバー。あなたはおそらく外国為替でテストされていないのですか?

 
Vladimir Karputov #:

取引サーバー。FXのテストはしていないのでしょうか?

FX業者のターミナルでテストしています。ビルドを更新してみます。

よろしく、ウラジミール。