I am trying to save the current value as LastEASlope.
But every time the data goes negative I get an error message as seen in the attachment.
I have tried every combination of things I can think of and still can’t find a solution.
While using the “New Indicator Builder” I have tried:
Type: double
Minimum = 0
Minimum = -100
Minimum = NULL
All had the same response- it doesn’t like negative numbers
Code Samples
if (State == State.SetDefaults)
EASlope = 0;
LastEASlope = 0;
#region Properties
[NinjaScriptProperty]
[Display(Name="EASlope", Order=7, GroupName="Parameters")]
Public double EASlope
{ get; set; }
[NinjaScriptProperty]
[Display(Name="LastEASlope", Order=8, GroupName="Parameters")]
public double LastEASlope
{ get; set; }
Code
var BadData = false; //Error Checking (this is the Primary Series)
if(EASlopeSeries[0] >= 0)
LastEASlope = EASlopeSeries[0];
else if(EASlopeSeries[0] < 0)
LastEASlope = EASlopeSeries[0];
else
{
EASlopeSeries[0] = LastEASlope;
BadData = true;
}
Please help me with a viable solution.
Chris Knudsen

Comment