每点的价格 - 页 10

 

最简单的方法是使用MT4上的点差经纪商为你计算,交易票据上的成交价不是以手为单位,而是以英镑和便士为单位,例如每点4.20英镑(或任何你想要的货币),这使得准确的交易规模非常简单。

我使用http://www.gkfx.co.uk/spreadbetting-on-MetaTrader4

 
LEHayes:

我不确定我是否在正确的轨道上,但以下是我迄今为止所做的努力。

从另一个网站上看到的计算方法是这样的。

(.0001/{当前货币对价格})*{合约大小,即100,000;10,000,等等}={某种价值}。*{美元价格}=每点价格

从这个提取的解释。

计算外汇点值的公式是以一个点除以货币对价值的价格,然后乘以一个单位,即10000。然后你需要把它换成美元,这样你就乘以当前的价格。例如,使用美元兑加元

(.0001/1.2148) x 10000 = .8232 x 1.2148 = 1.00美元

你总是会 看到 ,对于任何货币对,点值总是每10000货币单位1.00美元。你可能认为这个值很低。然而,你需要考虑 ,货币的交易量为100,000.00美元/手,每点为10.00美元。当你以10美元购买一手,货币增加了3个点,你就获得了30美元。


谢谢大家,我借用了一些代码,以下是我的贡献

double GetPPP( string symbol = "", double lots = 0.00 ){
   string sym = Symbol();
   if( symbol != "" ) sym = symbol ;
   double size = 1.00;
   if( lots > 0 ) size = lots ;
   string first = StringSubstr( symbol, 0, 3 );
   string second = StringSubstr( symbol, 3, 3 );
   string currency = AccountCurrency();
   if( symbol == "AUDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "AUDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "AUDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) )  * 100 );
   } else if( symbol == "AUDUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) ); 
   } else if( symbol == "AUDNZD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "CADCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "CADJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) )  * 100 );
   } else if( symbol == "CHFJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) )  * 100 );
   } else if( symbol == "EURAUD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURCAD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURGBP" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   }  else if( symbol == "EURJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) )  * 100 );
   } else if( symbol == "EURNZD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURusd" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPAUD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPCAD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPCHF" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPJPY" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) * 100 );
   } else if( symbol == "GBPNZD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) * 100  );
   } else if( symbol == "NZDUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   }  else if( symbol == "USDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * 1 / AvgPrice( StringConcatenate( first, second  ) ) );
   }  else if( symbol == "USDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * 1 / AvgPrice( StringConcatenate( first, second  ) ) );
   }  else if( symbol == "USDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * PipPoints * 1 / AvgPrice( StringConcatenate( first, second  ) ) * 100 ) ;
   } else {
      Print("Symbol ",symbol," is not supported.");
   }
}
 

对不起,这是一个更新,删除了PipPoints和固定的符号,并没有意识到它取决于我的一个其他使用年龄。

double PPP =GetPPP(Symbol())

doublePPP =GetPPP(Symbol() , 0.5);

double PPP =GetPPP( "NZDJPY")

希望对您有所帮助,并感谢您的首发。

double AvgPrice( symbol ){
   double bid, ask;
   ask = NormalizeDouble( MarketInfo( sym, MODE_ASK ), digits );
   bid = NormalizeDouble( MarketInfo( sym, MODE_BID ), digits ); 
   return ( ( ask + bid ) / 2 );
}
double GetPPP( string symbol, double lots = 0.00 ){
   double size = 1.00;
   if( lots > 0 ) size = lots ;
   string first = StringSubstr( symbol, 0, 3 );
   string second = StringSubstr( symbol, 3, 3 );
   string currency = AccountCurrency();
   if( symbol == "AUDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "AUDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "AUDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "AUDUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) ); 
   } else if( symbol == "AUDNZD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "CADCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "CADJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "CHFJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 / AvgPrice( StringConcatenate( currency, first ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURAUD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURCAD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURGBP" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   }  else if( symbol == "EURJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURNZD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "EURusd" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPAUD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPCAD" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPCHF" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPJPY" ){
     return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPNZD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "GBPUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   } else if( symbol == "NZDUSD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * AvgPrice( StringConcatenate( first, currency ) ) / AvgPrice( StringConcatenate( first, second ) ) );
   }  else if( symbol == "USDCAD" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * 1 / AvgPrice( StringConcatenate( first, second  ) ) );
   }  else if( symbol == "USDCHF" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.0001 * 1 / AvgPrice( StringConcatenate( first, second  ) ) );
   }  else if( symbol == "USDJPY" ){
      return ( size * MarketInfo( symbol, MODE_LOTSIZE ) * 0.01 * 1 / AvgPrice( StringConcatenate( first, second  ) ) ) ;
   } else {
      Print("Symbol ",symbol," is not supported.");
   }
}
 

对不起,从2013年开始,我就一直在关注这个问题。

但有没有人做过或发现过一个我可以输入一个值来支付我的每一个点,它将告诉我每一个货币对 的手数输入,就像一个点差赌注账户,但为标准的外汇账户?

 
绝不要冒超过你账户一小部分的风险,当然每笔交易要低于2%,总共6%。
  1. 在代码中(MT4)。风险取决于您的初始止损、手数大小和货币对的价值。它不取决于保证金和杠杆。
    1. 你把止损放在它需要的地方--交易的理由不再有效的地方。例如,交易一个支撑位的反弹时,止损要低于支撑位。
    2. 帐户余额 * 百分比/100 =风险= 订单手数 * (|订单开盘价 - 订单止损| * DeltaPerLot + 佣金PerLot) (注意OOP-OSL包括点差DeltaPerLot 通常在10美元/点左右,但它考虑了货币对与您帐户货币的汇率。
    3. 不要单独使用TickValue -DeltaPerLot,并验证MODE_TICKVALUE 是否像文档中承诺的那样,以您的存款货币返回数值,或者是否以工具的基础货币返回数值。
      MODE_TICKVALUE在许多经纪商的非外汇工具上不可靠 - MQL4编程论坛 2017.10.10
      对于Tick值有一个通用的解决方案吗?-货币对 - 一般 - MQL5编程论坛 2018.02.11
      手数计算偏离100倍 - MQL5编程论坛 2019.07.19
    4. 你必须正确规范手数,并对照最小最大 手数进行检查。
    5. 你还必须检查FreeMargin以避免止损

    大多数货币对每个PIP 价值约10美元。一个5美元的风险和一个(非常小的)5PIP 的SL是5/10/5美元或0.1手的最大值。

  2. 使用像我这样的GUI/交易助理EA(适用于MT4):"资金管理图形工具 "指标,作者是 "takycard" - 风险管理 - 文章,图书馆评论 - MQL5编程论坛 - Page 6 #55
 
//+------------------------------------------------------------------+
//|                                                      getInfo.mq4 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Open Source"
#property link      
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {


   double LotSize= 1;
   double point= Point;
   if((Digits==3) || (Digits==5))
     {
      point*=10;
     }
   string DepositCurrency=AccountInfoString(ACCOUNT_CURRENCY);  
   double PipValue=(((MarketInfo(Symbol(),MODE_TICKVALUE)*point)/MarketInfo(Symbol(),MODE_TICKSIZE))*LotSize);
    
   
   
   MessageBox("DEPOSIT CURRENCY"+ DepositCurrency ,"ToolBox");
   MessageBox("VALUE OF ONE PIP (1 LOT)="+ PipValue ,"ToolBox");
   
   
  }
//+------------------------------------------------------------------+