Login Page - Create Account

Support Board


Date/Time: Sat, 18 Jan 2025 19:43:52 +0000



Post From: SCinput Ref pass to Tool.BeginValue

[2018-02-19 08:10:32]
SilentH - Posts: 16
Hi, I'm learning ASCIL and trying to create a custom study that I pass values that will draw rectangles on my chart as support/resistance zones.

I'm slowly making progress but currently stuck on this:

SCInputRef UpperPriceLevel = sc.Input[2];
SCInputRef LowerPriceLevel = sc.Input[3];

UpperPriceLevel.Name = "Upper Price on Zone";
UpperPriceLevel.SetFloat(1.0f);
    
LowerPriceLevel.Name = "Lower Price on Zone";
LowerPriceLevel.SetFloat(1.0f);

Tool.BeginValue = UpperPriceLevel;
Tool.EndValue = LowerPriceLevel;

I know the BeginValue and EndValue are suppose to be in float, I thought I'm converting these values to floats by using .SetFloat. When I compile I get the following:

F:\SierraChart\ACS_Source\DailyLevels3.cpp(120): error C2440: '=': cannot convert from 's_SCInput_145' to 'float'
F:\SierraChart\ACS_Source\DailyLevels3.cpp(120): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Let me know if you have any suggestions