Download MetaTrader 5

points ticvalue base currency deposit currency

To add comments, please log in or register
rob
100
rob  
      string sy=Symbol();
      double bid=MarketInfo(Symbol(),MODE_BID);
      double lot=MarketInfo(Symbol(),MODE_LOTSIZE);
      double point=MarketInfo(Symbol(),MODE_POINT);
      double tickSize=MarketInfo(Symbol(),MODE_TICKSIZE);
      
      double oneLotDatum = lot * bid;
      double onePointOneLot= lot * (bid+point);
      double baseCurrencyPointValue = onePointOneLot-oneLotDatum;
      //The value in the base currency of one point move
      double pointValue=baseCurrencyPointValue;
      //same as tickSize: The value in the base currency of one tick
      double tickValue=baseCurrencyPointValue*(tickSize/point);//possibly more points in a tick than one
      
      //MQL4 Documentation MODE_TICKVALUE 16 Tick value in the deposit currency

I believe the above variable baseCurrencyPointValue holds the value of a 1 point move in the pairs base currency ie/. EURs for EURUSD ? I believe the above variable tickValue holds the value of a tick? MQL4 documentation states that MarketInfo(Symbol(),MODE_TICKVALUE) holds the value of a tick in the base currency! If it does why do all my calculated tickValue for all pairs equal MODE_TICKVALUE? I think it holds the value of the base currency? My deposit currency is GBP. I want for comparative purposes to obtain the value of a point in my deposit currency. Do I have to convert pointValue variable to deposit currency ie/EURUSD (EUR) to GBPEUR? for each pair?
whroeder1
17084
whroeder1  
  1. Please don't add text inside quoted text or SRC blocks, put it outside.
              MQL4 forum editor problem - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. double tickValue=baseCurrencyPointValue*(tickSize/point)
    Risk depends on your initial stop loss, lot size, and the value of the pair.
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
    Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.
rob
100
rob  
whroeder1:
  1. Please don't add text inside quoted text or SRC blocks, put it outside.
              MQL4 forum editor problem - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. Risk depends on your initial stop loss, lot size, and the value of the pair.
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
    Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.


    if (pair == "") pair = Symbol();
    return(  MarketInfo(pair, MODE_TICKVALUE)
           / MarketInfo(pair, MODE_TICKSIZE) );

I understand thanks.

PointValuePerLot(string pair="") equivalent baseCurrencyPointValue

double tickValue=baseCurrencyPointValue*tickSize

So is the documentation wrong ?

Do I have to calculate in my base currency for all pairs I am interested in ?

rob
100
rob  

Method 1

      string sy=Symbol();
      double bid=MarketInfo(Symbol(),MODE_BID);
      double lot=MarketInfo(Symbol(),MODE_LOTSIZE);
      double point=MarketInfo(Symbol(),MODE_POINT);
      double tickSize=MarketInfo(Symbol(),MODE_TICKSIZE);
      
      double oneLotDatum = lot * bid;
      double onePointOneLot= lot * (bid+point);
      double baseCurrencyPointValue = onePointOneLot-oneLotDatum;

Method 2

      double tickValue=MarketInfo(Symbol(),MODE_TICKVALUE);


Since column 'V' derived from Method 1 is the same as column 'TVal' taken from Method 2 I have to conclude that either:

1/.The cross rates are quoted in GBP and both return a point value in GBP

or

2/.They both return the value in the base currency of the pair


I think (1) cannot be true therefore (2) is true?

If this is correct does anyone know how to  get the base currency that instruments are quoted in so, that  I may apply a conversion to GBP.

Since the quotient (TV/TS) can vary in numerator/denominator values it is only possible to use these to get the value of a point not the smallest value of  a change in quote. This must remain unknown if they truly vary?

JC
1581
JC  

1/.The cross rates are quoted in GBP and both return a tick value in GBP

Your screenshot finally reveals that you are talking about a UK spread-betting account. Yes, in this instance, a contract such as EUR/USD is priced in GBP. It is fundamentally different to a normal fx account. When you go long 1 lot EUR/USD on this account, you are not going long 100,000 euros. You are making a bet in sterling on the EUR/USD price.

(It's not actually a requirement for contracts on a spread-betting to work this way. They can work the same way as a normal fx account. But it's a convention that contracts on a spread-betting account are always priced in £ per point.)

rob
100
rob  

Many thanks for your response. This clarifies things. I can now proceed with my current works.

On a standard account which is where I am going I guess a conversion is tricky .... finding the base and applying the conversion

Again thanks for your effort

JC
1581
JC  
bapo101:

On a standard account which is where I am going I guess a conversion is tricky .... finding the base and applying the conversion

To confirm, MODE_TICKVALUE is working correctly here. The documentation promises that it will return the "Tick value in the deposit currency". That's exactly what it's doing. The tick-value of EUR/USD on a spread-betting account is fundamentally different to the tick-value on a normal account because they are, fundamentally, not the same contracts.

(It is, however, possible for MODE_TICKVALUE to be wrong. You basically can't trust it on non-fx instruments until you have verified whether or not it is correct with your own particular broker on those instruments. With many brokers, contracts such as an equity index have MODE_TICKVALUE reported in the contract's base currency, not in the account's deposit currency. For example, with many brokers the MODE_TICKVALUE of the Dax will be reported as a figure in EUR regardless of whether your account is USD, GBP, CHF, etc).

rob
100
rob  

Yes I agree and understand your first comment.

On the second point .... ouch.... but useful information and good to know for my next step in account size (should I get there).

I see from your link above that 

SYMBOL_CURRENCY_PROFIT

Can be used to assist in standard account manipulation ... All good information

The simplicity of the spread bet account and the current UK taxation situation then seems to offer some benefits. A concern I have is how much the price feed on a SB account is manipulated by the broker relative to a standard account.

Many Thanks

JC
1581
JC  
bapo101:

The simplicity of the spread bet account [...]

It's not all that simple! The profits become taxable, for example, if you are deemed to be doing it professionally.

Regarding the "ouch" point, the tick values on a spread betting account are likely to be correct for all asset classes, and unproblematic, because everything is simply a bet in sterling. It's on "normal" accounts that the problems usually lie.

To add comments, please log in or register