Prezzo per pip - pagina 10

 

Il modo più semplice è quello di utilizzare un broker di spreadbetting su MT4 che fa il calcolo per voi, il prezzo del volume sul vostro biglietto commerciale non è in lotti ma in sterline e pence, ad esempio £4.20 per pip (o qualsiasi altra valuta che si desidera) Questo rende il dimensionamento accurato degli scambi molto semplice.

Io uso http://www.gkfx.co.uk/spreadbetting-on-MetaTrader4

 
LEHayes:

Non sono sicuro di essere sulla strada giusta, ma ecco cosa ho messo insieme finora.

Da un altro sito web il calcolo era qualcosa come:

(.0001/{prezzo corrente delle coppie})*{dimensione del contratto, cioè 100.000; 10.000, ecc} = {qualche valore} * {prezzo USD} = Prezzo per Pip

Spiegato da questa estrazione:

La formula per calcolare il valore del pip nel forex è di prendere un pip e dividerlo per il prezzo del valore della coppia di valute e poi moltiplicarlo per un'unità che è 10000. Devi poi cambiarlo in USD quindi lo moltiplichi per il prezzo corrente. Per esempio usando il USDCAD

(.0001/1.2148) X 10000 = .8232 X 1.2148 = $1.00

Vedraisempre che con qualsiasi coppia di valute il valore del pip è sempre $1.00 per 10000 unità di valuta. Si può pensare che questo valore sia molto basso. Tuttavia è necessario prendere in considerazione che le valute sono scambiate in lotti di $100.000,00 che sono $10,00 per pip. Quando acquisti un lotto per $10.00 e la valuta aumenta di 3 pip hai guadagnato $30.00.


Grazie ragazzi, ho preso in prestito del codice ed ecco il mio contributo

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.");
   }
}
 

scusate ragazzi ecco un aggiornamento, rimossoPipPoints e simbolo fisso, e non mi sono reso conto che dipendeva da una delle mie altre età d'uso:

double PPP =GetPPP( Sy mbol());

doublePPP = GetPPP(Symbol() , 0.5);

doppio PPP = GetPPP( "NZDJPY");

Spero che aiuti e grazie per l'antipasto.

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.");
   }
}
 

scusate il bump thread dal 2013,

Ma qualcuno ha fatto o trovato un indi che posso inserire un valore per pagarmi per pip e mi dirà l'input di dimensione del lotto per coppia di valute come un conto spread bet ma per i conti forex standard?

 
Non rischiate mai più di una piccola percentuale del vostro conto, certamente meno del 2% per scambio, 6% totale.
  1. Nel codice (MT4): Il rischio dipende dal tuo stop loss iniziale, dalla dimensione del lotto e dal valore della coppia. Non dipende dal margine e dalla leva finanziaria.
    1. Posizionate lo stop dove deve essere - dove la ragione del commercio non è più valida. Per esempio, facendo trading sul rimbalzo di un supporto, lo stop va sotto il supporto.
    2. AccountBalance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Nota OOP-OSL include lo spread, e DeltaPerLot è di solito circa $10/pip ma tiene conto dei tassi di cambio della coppia contro la valuta del tuo conto).
    3. NON usare TickValue da solo - DeltaPerLot e verificare che MODE_TICKVALUE stia restituendo un valore nella tua valuta di deposito, come promesso dalla documentazione, o se sta restituendo un valore nella valuta base dello strumento.
      MODE_TICKVALUE non è affidabile su strumenti non-fx con molti broker - MQL4 programming forum 2017.10.10
      Esiste una soluzione universale per il valore Tick? -Coppie di valute - Generale - Forum di programmazione MQL5 2018.02.11
      Calcolo del valore del lotto fuori da un fattore 100 - MQL5 programming forum 2019.07.19
    4. È necessario normalizzare correttamente i lotti e controllare rispetto a min e max.
    5. Devi anche controllare FreeMargin per evitare lo stop out

    La maggior parte delle coppie vale circa 10$ per PIP. Un rischio di $5 con uno SL (molto piccolo) di 5 PIP è $5/$10/5 o 0,1 lotti al massimo.

  2. Usa una GUI/Trade Assistant EA come la mia (per MT4): indicatore 'Money Manager Graphic Tool' di 'takycard' - Gestione del rischio - Articoli, Commenti della libreria - Forum di programmazione MQL5 - Pagina 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");
   
   
  }
//+------------------------------------------------------------------+