注文選択の問題
Results 1 to 2 of 2

Thread: 注文選択の問題

  1. #1
    こんにちは、
    コードの一部に問題があります。コードの破損部分は正常に機能していますが、テイクプロフィット変更部分は正しく機能していません。
    これは私が次のコードに実行させたいものです。

    1つ以上の未処理注文がある場合は、ループですべての注文を新しいorders takeprofit値に変更します。

    recentpricebuy()は、直近の価格のorderopenpriceを取得する関数です。
    recentpricesell()は売り注文を除いて同じ関数です。

    挿入されたコードvoid MonitorTrades(){int ticket;} int total = OrdersTotal(); (int i = total-1; igt; = 0; i--){OrderSelect(i、SELECT_BY_POS); {if(OrderType()== OP_BUY){if(入札gt; =(OrderOpenPrice() (BreakEven * Point))OrderStopLoss()lt; OrderOpenPrice()){ticket = OrderModify(OrderTicket()、OrderOpenPrice()、 OrderOpenPrice() (BreakEvenProfit * Point)、OrderTakeProfit()、0、CLR_NONE); if(ticketgt; 0 ShowAlerts == true)アラート(Breakevenが設定されている、OrderSymbol()、チケット番号、OrderTicket())。 if(OrderTakeProfit()lt; recentpricebuy() (TakeProfit * Point)){ticket = OrderModify(OrderTicket()、OrderOpenPrice()、OrderStopLoss()、recentpricebuy() (TakeProfit * Point)、0、CLR_NONE); if(ticketgt; 0 ShowAlerts == true)アラート(TakeProfitがオン、OrderSymbol()、チケット番号、OrderTicket())。 if(OrderType()== OP_SELL){if(Ask lt; =(OrderOpenPrice() - (BreakEven * Point))OrderStopLoss()gt; OrderOpenPrice()){ticket = OrderModify(OrderTicket()、OrderOpenPrice()) 、OrderOpenPrice() - (BreakEvenProfit * Point)、OrderTakeProfit()、0、CLR_NONE)。 if(ticketgt; 0 ShowAlerts == true)アラート(Breakevenが設定されている、OrderSymbol()、チケット番号、OrderTicket())。 if(OrderTakeProfit()gt; recentpricesell() - (TakeProfit * Point)){ticket = OrderModify(OrderTicket()、OrderOpenPrice()、OrderStopLoss()、recentpricesell() - (TakeProfit * Point)、0、CLR_NONE); if(ticketgt; 0 ShowAlerts == true)アラート(TakeProfitがオン、OrderSymbol()、チケット番号、OrderTicket())。 }}}}}

  2. #2
    問題を見つけるにはprint()を使用してください。

投稿権限

  • Youma新しいスレッドを投稿しない
  • Youmaは返信しない
  • あなたは添付ファイルを投稿しないかもしれない
  • Youma Notedityourposts
  •  
  • スマイリーはオンです
  • スマイリーはオンです
  • [IMG]コードがオンです
  • [VIDEO]コードがオンです
  • HTMLコードがオフです
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.