Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 21:18:25 +0000



[User Discussion] - Offering To The Community: Forex: Currency Decorrelation (and Currency Strength)

View Count: 9977

[2020-09-15 12:21:46]
bjohnson777 (Brett Johnson) - Posts: 284
Looks like lots of things got broken in the new SC version. I got this fix to "Remote Build" on 2168 I upgraded this morning. A quick test shows things working now, but give this a try and make sure you get the expected results. If there's a problem, I'll be back around late this evening to try and fix it.

Edit: (New source code is always attached to the top post.)
Date Time Of Last Edit: 2020-09-15 12:22:21
[2020-09-15 12:38:35]
sjkafeero - Posts: 21
Yes. The fix was successfully built. Thank you for the prompt solution. Been using your amazing study since 2016 with great success. Always praying for your good health. Thank you
[2021-09-17 21:58:36]
User997685 - Posts: 2
Hi Brett,
I am testing Forex: Currency Decorrelation and it is working very well, I would like to thank you for your effort.

I have one issue and one recommendation:
The recommendation:
It will be nice to include an option to reset the calculation (the zero point) to be in a specific date/ time, this will help if I want to reset the calculation from the first of the week for example or the first of the day. the option for bars back is good as well but it is not helping if I want this point to be fixed to specific time or data.

The issue:
when we use the study as "Display as main Price Graph" and "Decorrelate Other Currencies" as Yes, the study "Write Bar and Study Data To File" and the study "Spreadsheet Study" are showing only 6 currencies out of the 8. I tried to check the code but I did not see any reason for this behaviour.

Thanks again for your time and for sharing this valuable work.
[2021-09-19 06:03:14]
bjohnson777 (Brett Johnson) - Posts: 284
Give the attached source code file a compile and try. I "think" this will work consistently. You should put this in a new chartbook so your existing one doesn't get messy. If something breaks, you'll also have your original chartbook to fall back to. Be sure to select the FOREX study that is outside my main consolidation DLL as I've only updated it in the attached file. I'm on overload with my health problems getting worse and really don't have time to troubleshoot any problems, though, if it doesn't work.

To use it, set "Bars Back" to 0. Then you can select a date from the "Date Back" box below it. The date is kinda primitive looking, so you may want to select a date from the drop down box and then edit it to whatever you want. If "Bars Back" is greater than 0, it will override anything in the "Date Back" box.

For spreadsheet and writing to file, I don't know. I don't make any arbitrary limits in my code on this. SC may have an internal limit from legacy code, as what I do here is pretty heavy and probably wasn't fully considered years ago. You'll need to start a new forum post and ask the SC dev's. They don't like to see messy charts, so you may want to create yet another chartbook just for testing that is the Decorrelation study only with your file writer and spreadsheet troubles.
attachmentForex_CurrencyDecorrelationAndCurrencyStrength.cpp - Attached On 2021-09-19 05:51:06 UTC - Size: 127.39 KB - 284 views
[2022-01-23 06:08:37]
User169391 - Posts: 55
Hi Brett,
I tried this on the latest version and encountered errors(version 2348). Any help much appreciated.
[2022-01-24 11:34:29]
sjkafeero - Posts: 21
Hi Brett,
Hope your health has improved. Our prayers have been with you. Apologies for the bother but I too am having compling challenges after updating SC to version 2348. My career depends on your study the Currency Decrrelation. Your help will greatly appreciated. This is the error am getting:

The remote build did not succeed. Result:

Forex_CurrencyDecorrelationAndCurrencyStrength.cpp: In function 'void scsf_Forex_CurrencyDecorrelation(SCStudyInterfaceRef)':
Forex_CurrencyDecorrelationAndCurrencyStrength.cpp:659:52: error: invalid conversion from 'int' to 'HistoricalChartBarPeriodEnum' [-fpermissive]
659 | OpenChartParameters.HistoricalChartBarPeriod = pBarPeriod;
| ^~~~~~~~~~
| |
| int
Forex_CurrencyDecorrelationAndCurrencyStrength.cpp:688:52: error: invalid conversion from 'int' to 'HistoricalChartBarPeriodEnum' [-fpermissive]
688 | OpenChartParameters.HistoricalChartBarPeriod = pBarPeriod;
| ^~~~~~~~~~
| |
| int
Forex_CurrencyDecorrelationAndCurrencyStrength.cpp:740:52: error: invalid conversion from 'int' to 'HistoricalChartBarPeriodEnum' [-fpermissive]
740 | OpenChartParameters.HistoricalChartBarPeriod = pBarPeriod;
| ^~~~~~~~~~
| |
| int

-- End of Build -- 11:20:04
[2022-07-10 07:41:38]
bjohnson777 (Brett Johnson) - Posts: 284
Bunch of minor changes to compile with SC 2411.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account