Sorry, quite a long post again...
I'm still not happy with the way trendlines are implemented with currencies and currency templates.
To explain again my problem with the current implementation (summary of our past discussion above):
- I track many investments in FM and of course they can have different native currencies.
- I have set up the currency settings to be able to convert each of these native currencies to my default currency (which is €) with the "Exchange Rate Adjusted" button. This setup is saved as the EUR Template
- I have created too an USD Template to be able to convert each of the native currencies to another default currency which is $, because $ is the international reference currency, and I find very useful to analyze graphs in this reference currency too (an outstanding feature of the program btw)
Here are my currency settings for the EUR Template and the USD Template. Nothing special, standard way to set things I think.
You can see I use 3 letter codes for the investment's native currencies, and the symbols € and $ for the default currencies. This way I find it easier to see in the program:
1) if the investments have a native currency assigned or the default currency assigned (the last when their prices must not be adjusted with the "Exchange Rate Adjusted" command)
2) when "Exchange Rate Adjusted" is on or off
So, for market analysis, I very often switch between "Exchange Rate Adjusted" on and off and between the EUR and USD templates. So there are 4 situations where I draw trendlines:
1) "Exchange Rate Adjusted" on in EUR Template
2) "Exchange Rate Adjusted" off in EUR Template
3) "Exchange Rate Adjusted" on in USD Template
4) "Exchange Rate Adjusted" off in USD Template
What I would want is to draw trendlines without having to think of the current situation and that the trendlines to be displayed in all and only situations where it is relevant.
For example:
- in the situation 4 above, I draw a trendline on an investment whose native currency is EUR. So this trendline should appear too in the situations 1 and 2.
- in the situation 3 above, I draw a trendline on an investment whose native currency is EUR. So this trendline should NOT appear in all the other situations.
Here are examples of the problems with the current implementation, for an investment whose native currency is EUR:
1) "Exchange Rate Adjusted" on in EUR Template: the initial situation where the trendline is drawn / created (image1)
2) "Exchange Rate Adjusted" off in EUR Template: the trendline is not displayed, but it should be because it is relevant here too (image2)
3) "Exchange Rate Adjusted" on in USD Template: the trendline is displayed but it should not be, as it is not relevant when the investment is converted to $ currency (image3)
4) "Exchange Rate Adjusted" off in USD Template: the trendline is not displayed, but it should be because it is relevant here too (image4)
You had explained perfectly well above in this post the current behavior, why it behaves this way.
And you had suggested a workaround:
I think you can get what you want by just drawing trendlines with "Exchange Rate Adjusted" in the OFF position. Your trendlines will only be displayed when "Exchange Rate Adjusted" is OFF, no matter what template you load.
but this solution doesn't suit me as it lacks too much fluidity.
For what it's worth (and for the fun, because I like to think about those things ), I have thought of a modified implementation, certainly with flaws too and improvable, but I think better than the current. I hope you will find it useful to rethink the implementation.
First, a table that summarize the various situations:
And, below pseudocode on how things could work, roughly (I am not a coder so be forgiving)
- Code: Select all
--------------------------------------------
At the trendline creation (when it is drawn)
--------------------------------------------
If (The investment's currency is the default currency (of any template))
{
Do nothing special
}
Else If (The investment's currency is a native currency)
{
If ('Exchange Rate Adjusted' is not activated) Or If ('Exchange Rate Adjusted' is activated AND the investment's native currency has an 'Exchange Rate to default' set to 'Constant ratio = 1' in the currently loaded currency template)
{
Add to the trendline an internal tag "Drawn_In_Native_Currency"
}
Else If ('Exchange Rate Adjusted' is activated AND the investment's native currency has NOT an 'Exchange Rate to default' set to "Constant ratio = 1" in the currently loaded currency template)
{
Add to the trendline an internal tag "Drawn_In_CurrencyTemplate_Name_Id" (so with the info about the currently loaded currency template)
}
}
- Code: Select all
---------------------------
When to display a trendline
---------------------------
If (The investment's currency is the default currency (of any template))
{
Display the trendline in all situations (as it is now)
}
Else If Exists (The "Drawn_In_Native_Currency" internal tag attached to the trendline)
{
If ('Exchange Rate Adjusted' is not activated)
{
Display the trendline
}
Else If ('Exchange Rate Adjusted' is activated AND the investment's native currency has an 'Exchange Rate to default' set to "Constant ratio = 1" in the currently loaded currency template)
{
Display the trendline
}
}
Else If Exists (The "Drawn_In_CurrencyTemplate_Name_Id" attached to the trendline)
{
If (The currency template referenced in the tag is currently loaded)
{
If ('Exchange Rate Adjusted' is activated)
{
Display the trendline
}
}
}
Thank you for considering these improvements.