Hi,
I am workinig on a code that does some initial stock filtering wthin the Initialize function by triggering an standalone class. I am unable to find a way to:
1. Run debug messages from the code. ( I was able to retrieve variables from the class so I know it was created, but the constructor debug message was never triggered)
2. Get histroical prices within the partial class function. Is this not possible within QC or am I doing it in the wrong way?
Very thankful if anyone has some inputs.
namespace QuantConnect {
public partial class PairSelection : QCAlgorithm, IAlgorithm
{
private string[] tickerSymbols;
public PairSelection(string[] tickers){
this.tickerSymbols = tickers;
Debug("Triggered the PairSelection constructor");
}
public List<Stocks> selectPairs()
{
Debug("Triggered the selectPairs function");
for(int m = 0; m<tickerSymbols.GetLength(); m++){
AddEquity(tickerSymbols[m], Resolution.Daily);
var histEq = History(tickerSymbols[m], TimeSpan.FromDays(252), Resolution.Daily);
// Do some other things
}
}
}
}