CurrencyExposure

Post Reply
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

CurrencyExposure

Post by renexxxx »

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.
You do not have the required permissions to view the files attached to this post.
Last edited by renexxxx on Sat Oct 25, 2014 8:44 pm, edited 1 time in total.
User avatar
mobthehop
Trader
Posts: 362
Joined: Wed Nov 16, 2011 12:16 am

CurrencyExposure

Post by mobthehop »

another nice one - thanks!
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

CurrencyExposure

Post by milanese »

Great coding, I like it!

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
Tebis
Trader
Posts: 111
Joined: Wed Nov 16, 2011 9:50 am
Location: Switzerland

CurrencyExposure

Post by Tebis »

Information is all, gr8 indicator, thanks Rene for the fast coding :good:
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

CurrencyExposure

Post by renexxxx »

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.
User avatar
Tebis
Trader
Posts: 111
Joined: Wed Nov 16, 2011 9:50 am
Location: Switzerland

CurrencyExposure

Post by Tebis »

renexxxx » Yesterday, 22:46 wrote:There was a little copy-paste bloop in the code ...
thanks Rene !
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

CurrencyExposure

Post by renexxxx »

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.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Indicators”