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! :)
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:
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! :)
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? :)