Remember the CurrencyExposure indicator? That indi displays the currency exposure for all the currently open trades.
Boulder (Aram) contacted me some time ago, with a request to create an indicator that would display the historical currency exposure, for all selected currencies, similar to how TradeChart2 displays the equity and balance lines.
The attached CurrencyExposureChart is a result of this request.
It works like this:
(1) It collects all the trades (historical and currently open), that pass the MagicNumber, CommentFilter, SymbolFilter, CurrencyFilter and date selection criteria.
(2) Subsequently, it works out for each candle in the reporting period, which of these orders was/is open (or partially open) during that candle. Knowing which orders were open for each shift, it can then derive the currency exposure for that shift.
If there were many orders in the result set obtained in (1), and there are many candles in the reporting period, the workload for this indicator is huge ... and appears to hang Empty4. So, use the input parameters wisely to restrict the number selected orders and candles.
Empty4 limits the number of buffers in a custom indicator to 8. This limits the number of lines (i.e. currencies) the indicator can display. So, if you specify more than 8 currencies, it will only display the first 8.
Have fun.
CurrencyExposureChart
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
CurrencyExposureChart
You do not have the required permissions to view the files attached to this post.
-
arts
- Trader
- Posts: 10
- Joined: Thu Nov 17, 2011 2:09 pm
CurrencyExposureChart
Hi Renexxxx,
Interesting indicator.
In fact you are no longer restricted to 8 buffers and haven't been for some time. I believe you can now have up to 512 although 29 is the most I've ever used...
Regards,
Arts
Interesting indicator.
In fact you are no longer restricted to 8 buffers and haven't been for some time. I believe you can now have up to 512 although 29 is the most I've ever used...
Regards,
Arts
- renexxxx
- Trader
- Posts: 860
- Joined: Sat Dec 31, 2011 3:48 am
CurrencyExposureChart
Oops, you're right, as demonstrated in this code.
You do not have the required permissions to view the files attached to this post.
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
CurrencyExposureChart
That is really handy info Arts. Thanks.arts » Fri Jan 13, 2017 4:46 pm wrote:Hi Renexxxx,
Interesting indicator.
In fact you are no longer restricted to 8 buffers and haven't been for some time. I believe you can now have up to 512 although 29 is the most I've ever used...
Regards,
Arts
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.