stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

CurrencyExposure
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3897
Page 1 of 1
Author:  renexxxx [ Sat Oct 25, 2014 1:13 am ]
Post subject:  CurrencyExposure

Ernst (Tebis) had the idea to create an indicator that would display the exposure of currencies (as opposed to currency pairs, by using the following calculation, and I quote:
Calculation for open trades
1 Lot AUDUSD long = 1 lot AUD long / 1 lot USD short
2 Lot EURAUD short = 2 Lot EUR short / 2 lot AUD long
1 Lot EURUSD short = 1 Lot EUR short / 1 Lot USD long
0.5 Lot EURGBP short = 0.5 EUR short / 0.5 GBP long

Only Lot Results would be displayed like:

AUD: 3.00
USD: 0.00
EUR: -3.50
The indicator below tries to address that requirement:
Selection_089.png
Code attached.
Author:  mobthehop [ Sat Oct 25, 2014 1:59 am ]
Post subject:  CurrencyExposure

another nice one - thanks!
Author:  milanese [ Sat Oct 25, 2014 6:35 am ]
Post subject:  CurrencyExposure

Great coding, I like it!

Cheers :)

Tommaso
Author:  Tebis [ Sat Oct 25, 2014 7:33 am ]
Post subject:  CurrencyExposure

Information is all, gr8 indicator, thanks Rene for the fast coding :good:
Author:  renexxxx [ Sat Oct 25, 2014 8:46 pm ]
Post subject:  CurrencyExposure

There was a little copy-paste bloop in the code ...

This

Code: Select all

#property indicator_separate_window
should of course be:

Code: Select all

#property indicator_chart_window
Update is in post 1.
Author:  Tebis [ Sun Oct 26, 2014 5:26 am ]
Post subject:  CurrencyExposure

renexxxx ยป Yesterday, 22:46 wrote:There was a little copy-paste bloop in the code ...
thanks Rene !
Author:  renexxxx [ Tue Nov 25, 2014 7:10 am ]
Post subject:  CurrencyExposure

I have made a small cosmetic change to this indicator, as the white text color was hard to read in bright green and bright red tiles. So, it now looks like this:
Selection_104.png
Thanks go to Tebis for finding this fault. Update is in post 1.
All times are UTC Page 1 of 1