Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 06:00:48 +0000



SOLVED (stupid/distraction error..) : ACSIL error in the format..

View Count: 781

[2019-11-07 16:10:02]
GiovanniD - Posts: 41
#**********************************************
error: no match for 'operator*' (operand types are 'float' and 'c_ArrayWrapper<float>')
ema1[sc.Index] = alpha1*sc.BaseData[SC_LAST] + (1-alpha1)*ema1[sc.Index-1];
#**********************************************

NB: below only the lines of code that cause the error


SCSubgraphRef MEYERBUTTERWORTH = sc.Subgraph[0];//lento
SCFloatArrayRef ema1 = sc.Subgraph[7].Arrays[0];

int EMALength1 = nn;
float alpha1 = 2/(EMALength1+1);
ema1[sc.Index] = alpha1*sc.BaseData[SC_LAST] + (1-alpha1)*ema1[sc.Index-1];
sc.Subgraph[0][sc.Index] = ema1[sc.Index];

[2019-11-07 18:27:58]
Sierra Chart Engineering - Posts: 104368
This needs to be:
sc.BaseData[SC_LAST][sc.Index]

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

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

Login

Login Page - Create Account