Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 22:09:07 +0000



[Programming Help] - ACSIL Help - Sine wave indicator

View Count: 1941

[2019-08-11 07:16:00]
User365411 - Posts: 173
I'm trying to code (and learn, I'm a very newbie coder) in ACSIL a sine wave indicator like the one in the image, that I had built via spreadsheet study, with exact starting point and length as input and auto-coloring slope.
For now I was able to get only an horizontal line. So I have the math function but I'm unable to "wave" the function. Too bad.
Looking through .cpp examples was not useful, because the majority of them (the simplest at least) are tied to price, while this indicator is tied to time.
Can someone help me with the code?
Thank you
Date Time Of Last Edit: 2019-08-11 07:20:04
imagesinewave.png / V - Attached On 2019-08-11 07:13:52 UTC - Size: 29.17 KB - 546 views
[2019-08-11 08:35:06]
Ackin - Posts: 1865
Hi,
check scsf_SineWaveWMA (studies5.cpp)

There is everything what do you need ... + just logic and mathematics

Good luck
[2019-08-11 08:50:59]
User365411 - Posts: 173
Hi,
check scsf_SineWaveWMA (studies5.cpp)

There is everything what do you need ... + just logic and mathematics


thanks Ackin
Already started from that but the problem is that I'm unable to tie the function to time (bars count), not to price.
[sc.Index] gives me only price.
[2019-08-11 09:14:00]
Ackin - Posts: 1865
no only price, index from a different perspective = bar with "time start and end"
In your case is chart 60 min

Other type chart - No time based:
You must convert bars and their time into time units and then work with them. Sinus won't be as nice as your picture, it's not possible. The smoothing of the curve is based on linearity, which in case of time will not be there.

I'm trying to code (and learn, I'm a very newbie coder) in ACSIL
Give it some time and effort. If you don't solve it - you can write to me via Direct message. But writing a solution now won't help you learn to think like a programmer in the future.
Date Time Of Last Edit: 2019-08-11 09:14:36
[2019-08-11 09:36:08]
User365411 - Posts: 173
Great effort to me ;)
Yes probably i need sc.Input[].SetDateTime() and sc.Input[].GetDateTime() array to start calculation.
Well i'll try but i don't think that i successfully "wave" something :(
TY
[2019-09-16 13:24:51]
Ackin - Posts: 1865
I have unfinished some studies (like Depth strength meter and others ...), but at the end of the week I will look at it and make it ... it will be to download on CZ / SK forum or write me about the source code via email...

Contact:
https://www.sierrachart.com/UserControlPanel.php?page=StudyStore&SCDLLName=zyp_download_free
[2019-09-16 13:53:55]
User365411 - Posts: 173
Ty Ackin
but thanks to the summer holidays and the Bjarne Stroustrup C++ book finally I was able to effectively code my study so I don't need your time anymore, for now ... ;)
Thanks again.
[2019-09-16 14:32:05]
Ackin - Posts: 1865
I was able to effectively code my study
great ;)

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

Login

Login Page - Create Account