I am running a couple of strategies using same structure.
Add(PeriodType.Minute,1440);
Add("^VIX",PeriodType.Day,1);
Main chart is based on 1 minute data and there are two others sources needed to run strategies: 1440 min chart and VIX daily chart. The VIX data is checked as follow several times along the script:
if (Closes[2][0] <= 20.00)
{
contratos = 1;
compra = 70.0;
ganancias = 110.0;
stopGanancias= 90.0;
stopLoss= 45.0;
}
else if ((Closes[2][0] > 30.00) && (Closes[2][0] <= 59.00))
{
contratos = 1;
compra = 25.0;
ganancias = 140.0;
stopGanancias= 95.0;
stopLoss= 10.0;
}
To load VIX data I use kinetic connection and update vix chart every day. Supposedly, once chart has been uptdated and last data loaded it should be used as data entrance ( Closes[2][0]) for next session. But I have noticed that strategies not always works with previous session VIX data. By the way, using strategy analyzer...Strategies got VIX data as should.
My question is how should I chart VIX daily chart using kinetic connection to get last session VIX data?
Regards,
Fernando
Comment