Login Page - Create Account

Support Board


Date/Time: Thu, 08 May 2025 04:48:43 +0000



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

[2024-11-25 12:26:46]
emmanuel - Posts: 62
NewOrder.Stop1Price is a double, but you can assign a float value to it without issues. The problem is that SCFloatArray is an array of floats, not a float. You need to decide which of the array values you want to use. For example, the code below will use the current value in SLlongRef:

NewOrder.Stop1Price = SLlongRef[sc.Index];

However, you may want to use the value from the prior bar:

NewOrder.Stop1Price = SLlongRef[sc.Index - 1];