Hi,

I have successfully implemented CustomDataNIFTYAlgorithm exemple. No problem with that.

But I am bit lost on how to work with data at portfolio level (temporal sync - day or month sync).

For example, after creating my 'portfolio'

public override void Initialize(){

xxxxx

AddData<Stock1>("Stock1");

AddData<Stock2>("Stock2");

etc...

}

 I would like to implement this pseudo code on scheduled base (day or month sync)

public override void OnEndOfDay()
{
bars_stock1= RetrieveHistory("Stock1", xdays);

bars_stock2= RetrieveHistory("Stock1", xdays);

score1=calculte_MetricXX(bars_stock1); // Custom score , what you want (ROC, quantiles...)

score2=calculte_MetricYY(bars_stock1); // Custom score , what you want

CompareScoreAndSelectXBestScore();

BuyXBetterScore();

}

I don't know how to RetrieveHistory (and correctly synchronized). I am just interessed in  close price (or adjusted close).

In advance thank's for your help.

 

 

 

 

    

Author