Support Board
Date/Time: Wed, 15 Jan 2025 15:45:36 +0000
Post From: Getting error messages all over the place.
[2017-06-24 19:36:32] |
Ernest - Posts: 10 |
Hello, I am very very new to this platform so help me out. I am starting to learn to programm in Sierra and this is probably a very stupid error but I just can't figuri out. What I am trying to do is draw a ractangle on the actual index bar if the previous bar high is less that the actual bar close with the condition that the actual bar high > actual bar close (bullish). I copied some code from the study.cpp file.. The error I am getting I think it has to do with the data type "float". I dont know what is going on here. Thanks //Start checking the bars behind if (sc.Close > sc.Open) { if (sc.High[sc.Index-1] < sc.Close[]) { Tool.BeginDateTime = sc.BaseDateTimeIn[]; Tool.EndDateTime = sc.BaseDateTimeIn[]; Tool.BeginValue = sc.GetHighest(sc.Low, sc.Index, 10); Tool.EndValue = sc.GetLowest(sc.Low, sc.Index, 10); Tool.Color = RGB(255,0,0); // Red Tool.LineWidth = 1; //To see the outline this must be 1 or greater. Tool.SecondaryColor = RGB(0,255,0); Tool.TransparencyLevel = 75; Tool.AddMethod = UTAM_ADD_OR_ADJUST; sc.UseTool(Tool); LineNumber12 = Tool.LineNumber;//Remember line number which has been automatically set LineNumber12 = Tool.LineNumber;//Remember line number which has been automatically set // Change rectangle highlight Tool.Clear(); // reset tool structure for our next use Tool.ChartNumber = sc.ChartNumber; Tool.LineNumber = LineNumber12; Tool.Color = RGB(255,200,0); Tool.LineWidth = 3; Tool.SecondaryColor = RGB(0,0,255); Tool.AddMethod = UTAM_ADD_OR_ADJUST; sc.UseTool(Tool); } } |