Login Page - Create Account

Support Board


Date/Time: Thu, 08 May 2025 05:10:19 +0000



Post From: ACSIL: Using subgraph values for NewOrder.Stop1Price, float vs double error

[2024-11-25 07:23:51]
User745789 - Posts: 377
I am a beginner ACSIL user, but come a long way in 2 days.

I have this

//Declare variables to hold the array of values from the stoploss line studies
  SCFloatArray SLlongRef;
  SCFloatArray SLshortRef;

Then in other lines of code not shown here, I successfully populate these arrays with the study subgraph values that I want to use as stoploss prices. Using msg I have confirmed this works in the message log with some debug text.

Then I experimented with this to use these array values as attached stop loss prices:

//Attach SL - using study
    NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_STOP;
    NewOrder.Stop1Price = SLlongRef;
    NewOrder.Stop1Price_2 = SLshortRef;

But I get a compiler error:

SCFloatArray {aka c_ArrayWrapper<float>}
ORB_simple.cpp:77:27: error: cannot convert 'SCFloatArray' {aka 'c_ArrayWrapper<float>'} to 'double' in assignment

Which Seems to tell me that "NewOrder.Stop1Price" is a Double not a Float?

How do I solve this?

Please excuse incorrect use of terminology.
Date Time Of Last Edit: 2024-11-25 07:24:43