When running one NinjaScript strategy from the Strategies tab on a list of 500 instruments how do I limit my trading to one signal on the entire portfolio? (Per day)
e.g.
Int TotalSignalsInPortfolio ; // Global Variable?
if (Bars.IsFirstBarOfSession && IsFirstTickOfBar)
TotalSignalsInPortfolio = 0 ;
if (BuySignal && TotalSignalsInPortfolio == 0)
{
TotalSignalsInPortfolio = 1 ;
EnterLong() ;
}
How do I match the trading date to the current date?
i.e.
if (bardatetime == computerdatetime // today’s date)
{
Actions
}
How do I access the account’s buying power and cash value from within a strategy?
Thank you
Comment