Download MetaTrader 5

Account currency to quote or base currency

To add comments, please log in or register
RichPiano
135
RichPiano  

Hi

 

I want to create an indicator displaying risk and reward levels for a currency pair. However, I don't want to settle my risk in pips but in effective account currency, let's say EUR 5.-, and then translate it into Pips with an also predefined Lot Size.

 

For example: Let's say I'm trading USD/CAD and my account currency is EUR. Now when I want to buy USD with CAD i need to buy CAD first with the EUR in my account, so that I can make that trade (cross currency pairs). Now my risk in EUR is 5.- and I have to translate that into CAD, right? So i want to know how much risk CAD i get for my risk EUR 5.-. How can I do this programmatically?

 

The problem is, that if I clump together a currency pair to make a symbol out of it, this currency pair might not be provided by my broker.

 

For example: I want to trade USD/MXN, however my broker doesn't offer an EUR/MXN symbol for trade so that i could exchange my account EUR to MXN and then buy USD. However, there must be such an exchange rate. How do i find that exchange rate without using the symbol? Is there a way?

 

Thank you for your help! :) 

Alain Verleyen
Moderator
31185
Alain Verleyen  
You have to use TICK_VALUE. See documentation.
RichPiano
135
RichPiano  
Alain Verleyen:
You have to use TICK_VALUE. See documentation.
Thanks, yes that could work :)
LANGAT NAFTALI
662
LANGAT NAFTALI  
You have been provided with a good answer if you can see below tick value have been used to achieve the relative rates for pairs not available on this broker Tick value only works
whroeder1
14781
whroeder1  
RichPiano: I want to create an indicator displaying risk and reward levels for a currency pair. However, I don't want to settle my risk in pips but in effective account currency, let's say EUR 5.-, and then translate it into Pips with an also predefined Lot Size.
  • 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
RichPiano
135
RichPiano  

Thank you guys! :)


I'm just now working on implementing what you've thaught me. However, there's still a gap in my mind regarding MODE_TICKVALUE.


Here's what the documentation tells us about MODE_TICKVALUE:

MODE_TICKVALUE

16

Tick value in the deposit currency


So what I'm guessing is, that TICKVALUE is the amount of money my deposit is going to make when the currency pair exchange rate that I'm looking changes by one single tick. But this still begs the question, what position size this is calculated for? Because if i buy 100 lots of EUR/USD and the exchange rate goes down by one tick I lose a shitload of money, whereas if I only trade 1 Microlot it would only scratch my deposit. So what exactly is TICKVALUE?


In fact, it would help me most if someone could use it in a formula.


Thank you very much! :)


whroeder1
14781
whroeder1  
  • 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
RichPiano
135
RichPiano  
whroeder1:
  • 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


Thank you for your answer whroeder1.


Yet I don't really understand what DeltaPerLot does as a function, could you clarify that in simple terms? :)

whroeder1
14781
whroeder1  
Conversion factor. Change of balance = OrderLots * (OrderClosePrice - OrderOpenPrice) * DeltaPerLot
To add comments, please log in or register