Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 10:57:12 +0000



ACSIL: compare condition not valid, rounding problem ?

View Count: 1382

[2014-01-31 10:06:49]
User40117 - Posts: 56
hi,

i'm converting code from another language into ACSIL.
an indicator draws support and resistance levels. I can achieve this using horizontal rays. However some of them are not drawn allthough conditions are met when examening values.
I compare a price value in between several bars, if they are equal (==) the condition is valid. All values are equal fe 9313.5 when examening (they are copied btw when building the array so they should be equal).
Most of the rays are drawn however only a few are not but the condition should be valid...
Could there be a rounding problem when comparing these float values ?

ty
[2014-01-31 10:15:43]
Sierra Chart Engineering - Posts: 104368
Use this function for comparing float values:
https://www.sierrachart.com/index.php?l=doc/doc_ACSIL_Members_Functions.html#scFormattedEvaluate
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2014-01-31 10:33:04]
User40117 - Posts: 56
ty, but it was (as usual) a coding problem.

However i have another question regarding these lines. I would like the line to show up in another chart. Although i have defined the chart number in the settings to display the drawing tools, the lines from my studie are not shown, manually drawn lines however are shown.

Is it possible to copy lines created by a study to show up in another chart ?
Or do i draw them twice using Tool.ChartNumber = sc.ChartNumber ...


[2014-01-31 15:02:49]
User40117 - Posts: 56
Tool.AddAsUserDrawnDrawing = 1;

doesn't seem to help either...
[2014-02-04 00:33:28]
Sierra Chart Engineering - Posts: 104368
Or do i draw them twice using Tool.ChartNumber = sc.ChartNumber ...
Yes. But refer to the documentation for s_UseTool::ChartNumber here:
http://www.sierrachart.com/index.php?l=doc/doc_DLLTools.html
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2014-02-04 00:46:36

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

Login

Login Page - Create Account