I am trying to change Indicator parameters based on condition (time). But I am unable to do so.
I have tried putting the code in State.Configure , State.DataLoaded & OnBarUpdate()
With on bar, the values don't match. With configure & data loaded, it errors out.
Please advise & comment on the resource usage as well, if possible.
if ((ToTime(Time[0]) >= 93000 && ToTime(Time[0]) < 110000))
{
currentVWAP = amaCurrentDayVWAP(Close, amaSessionTypeVWAPD.Custom_Hours, amaBandTypeVWAPD.Standard_Deviation, amaTimeZonesVWAPD.US_Eastern_Standard_Time, @"09:30", @"11:00", 1, 2, 3, 1, 2, 3);
}
else if ((ToTime(Time[0]) >= 110000 && ToTime(Time[0]) < 120000))
{
currentVWAP = amaCurrentDayVWAP(Close, amaSessionTypeVWAPD.Custom_Hours, amaBandTypeVWAPD.Standard_Deviation, amaTimeZonesVWAPD.US_Eastern_Standard_Time, @"11:00", @"12:15", 0.7, 1.25, 3, 0.7, 1.25, 3);
}
Print ("Current : " + currentVWAP.SessionVWAP[0]);
Thanks in advance.
Comment