Hi,
I have this section of code that adds values to an array I'd like to plot:
plotLoss = Null;
plotProfit = Null;
plotStopPrice = Null;
plotLimitPrice = Null;
for ( i = 0; i <= BarCount-1; i++)
{
if ( buyFound[i] == 1 && MinutesSinceOpen[i] < 390 && MinutesSinceOpen[i] > 0)
{
plotLoss[i] = BuyLoss[i];
plotProfit[i] = BuyProfit[i];
plotStopPrice[i] = BuyStopPrice[i];
plotLimitPrice[i] = BuyLimitPrice[i];
}
if ( shortFound[i] == 1 && MinutesSinceOpen[i] < 390 && MinutesSinceOpen[i] > 0)
{
plotLoss[i] = ShortLoss[i];
plotProfit[i] = ShortProfit[i];
plotStopPrice[i] = ShortStopPrice[i];
plotLimitPrice[i] = ShortLimitPrice[i];
}
}
//
AddColumn (MinutesSinceOpen, "MinutesSinceOpen");
AddColumn (plotLoss, "plotLoss");
AddColumn (plotProfit, "plotProfit");
AddColumn (plotStopPrice, "plotStopPrice");
AddColumn (plotLimitPrice, "plotLimitPrice");
AddColumn (buyFound, "buyFound");
AddColumn (shortFound, "shortFound");
//
Plot( plotLoss, "plotLoss", colorRed, styleLine );
Plot( plotProfit, "plotProfit", colorGreen, styleLine );
Plot( plotStopPrice, "plotStopPrice", colorOrange, styleDashed );
Plot( plotLimitPrice, "plotLimitPrice", colorBlack, styleDashed );
I can't seem to figure out why the values are blank when plotted becuase they show up correctly in the exploration. I'm not understanding how amibroker works completely I think.