タイトルが入力されていません。
コンテンツがありません。
There have no category
There have no subcategory
口座全体の損益 >数値 にした場合の計算はどのようになってますか? あと質問が約2か月返ってきてません
計算は以下のようになっております。
【外部変数】 input double Number_value_1_1_2 = 100; //Number_value →上記では100pipsがパラメータでございます 【価格換算用関数】 double PointToPrice(int value) { return(value * Point); } 【pips換算用関数】 double PriceToPips(double value) { int mult = (Digits == 3 || Digits == 5) ? 10 : 1; return(value / Point/ mult); } 【損益取得関数】 double getOrderProfit(string magicstring, int method, bool is_all) { double profit = 0; string magics[]; int sep_num; sep_num = StringSplit(magicstring , ',' , magics); if(sep_num>0) { for(int i = OrdersTotal() - 1; i >= 0; i--) { if(OrderSelect(i, SELECT_BY_POS) == false) continue; if(is_all == false && !checkMagicNumbers(magics,OrderMagicNumber())) continue; if(method == 0){ if(OrderType() == OP_BUY || OrderType() == OP_SELL) { profit += OrderProfit(); } }else{ if(method == 1 && OrderType() == OP_BUY) { profit += OrderProfit(); } if(method == 2 && OrderType() == OP_SELL) { profit += OrderProfit(); } } } } return(profit); } 【損益取得関数】 double getOrderProfitPips(string magicstring, int method, bool is_all) { double profit = 0; string magics[]; int sep_num; sep_num = StringSplit(magicstring , ',' , magics); if(sep_num>0) { for(int i = OrdersTotal() - 1; i >= 0; i--) { if(OrderSelect(i, SELECT_BY_POS) == false) continue; if(is_all == false && !checkMagicNumbers(magics,OrderMagicNumber())) continue; if(method == 0){ if(OrderType() == OP_BUY) { profit += PriceToPipsWithSymbol(MarketInfo(OrderSymbol(),MODE_BID) - OrderOpenPrice(),OrderSymbol()); } if(OrderType() == OP_SELL) { profit += PriceToPipsWithSymbol(OrderOpenPrice() - MarketInfo(OrderSymbol(),MODE_ASK),OrderSymbol()); } }else{ if(method == 1 && OrderType() == OP_BUY) { profit += PriceToPipsWithSymbol(MarketInfo(OrderSymbol(),MODE_BID) - OrderOpenPrice(),OrderSymbol()); } if(method == 2 && OrderType() == OP_SELL) { profit += PriceToPipsWithSymbol(OrderOpenPrice() - MarketInfo(OrderSymbol(),MODE_ASK),OrderSymbol()); } } } } return(profit); }
また、過去のご質問にて損益に関する記事がございましたため ご案内いたします。
損益 ・ アラート・仮想通貨など https://labo.gogojungle.co.jp/articles/1048
ご参考いただけますと幸いです。何卒よろしくお願い致します。
また、前回のご質問に返信できておらず誠に申し訳ございません。 調査にはお時間がかかることがございますため ご理解いただけますと幸いでございます。
コメント文がありません。
計算は以下のようになっております。
また、過去のご質問にて損益に関する記事がございましたため
ご案内いたします。
ご参考いただけますと幸いです。何卒よろしくお願い致します。
また、前回のご質問に返信できておらず誠に申し訳ございません。
調査にはお時間がかかることがございますため
ご理解いただけますと幸いでございます。