Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 05:18:59 +0000



moving from signal to trading system - compiling etc.

View Count: 651

[2017-03-23 20:56:39]
User61576 - Posts: 418
hi
i am trying for learning purpesses to take JYSD delta divergence signal and turn it to a system.

i read here http://www.sierrachart.com/index.php?page=doc/BuildCustomStudiesDLL.html

when compiling the attached according to the above link i got the following errors:

C:\SierraChart\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
Auto_v1_DeltaDivergence_v5.cpp
C:\SierraChart\ACS_Source\Auto_v1_DeltaDivergence_v5.cpp(159): warning C4305: 'argument': truncation from 'double' to 'float'
C:\SierraChart\ACS_Source\Auto_v1_DeltaDivergence_v5.cpp(163): warning C4305: 'argument': truncation from 'double' to 'float'
C:\SierraChart\ACS_Source\Auto_v1_DeltaDivergence_v5.cpp(167): warning C4305: 'argument': truncation from 'double' to 'float'
C:\SierraChart\ACS_Source\Auto_v1_DeltaDivergence_v5.cpp(174): warning C4305: 'argument': truncation from 'double' to 'float'
C:\SierraChart\ACS_Source\Auto_v1_DeltaDivergence_v5.cpp(335): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
Creating library Auto_v1_DeltaDivergence_v5.lib and object Auto_v1_DeltaDivergence_v5.exp
Generating code
Finished generating code
-- End of Build -- 22:13:54

the dll file was generated.

my questions are:
1. are this errors "auto fix" of the compiler?
2. in the directory there were additional files created (lib, exe, obj, txt, bat) - are they needed farther or can i delete them?

thanks
attachmentAuto_v1_DeltaDivergence_v5.cpp - Attached On 2017-03-23 20:38:48 UTC - Size: 12.35 KB - 237 views
[2017-03-23 23:18:28]
enemyspy - Posts: 304
Those are just compliler warnings because you did not cast the doubles as floats and the int as a float when putting it in the float array. A lot of the time it does not matter, and sometimes it can result in inaccurate values on conversion.

But if you want to get rid of the warnings just cast it properly:
int a = 1;
float b = (float)a;

you should not get some of those files, when you create the project it should be an empty dll you only really need the dll and the debug file.

Also usually truncating a double to a float is a bad idea because it will not be accurate if the variable you are using in the first place needs the decimal precision of a double.
if you do not require the decimal precision of a double you should use a float then you don't need to cast it.
Date Time Of Last Edit: 2017-03-23 23:23:50
[2017-03-24 04:43:03]
Sierra Chart Engineering - Posts: 104368
1. You can ignore those warnings or perform typecast as explained in the prior post.

2. These other files you can delete.
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: 2017-03-24 04:43:19

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

Login

Login Page - Create Account