if (CurrentBar == 0 && CurrentBars[0] == 0)
{
// Initialize series at the first bar
haCloseSeries[0] = Close[0];
haOpenSeries[0] = Open[0];
haHighSeries[0] = High[0];
haLowSeries[0] = Low[0];
HAOpen[0] = Open[0];
HAHigh[0] = High[0];
HALow[0] = Low[0];
HAClose[0] = Close[0];
if (showOutput && !backTest)
{
Print("Strategy initializing..., Bar 0 set.");
Print("Bars loaded for Chart series: " + CurrentBar);
Print("Bars loaded for primary series: " + CurrentBars[0]);
Print("Bars loaded for secondary series: " + CurrentBars[1]); return;
}
}
if (Bars.IsFirstBarOfSession)
{
if (CurrentBars[1] < 3) { Print("Setting Historical Bar Reference point..."); return; }
openOfDay = Opens[1][0];
closeOfPreviousDay = Closes[1][1];
openOfPreviousDay = Opens[1][1];
closeOfPriorDay = Closes[1][2];
openOfPriorDay = Opens[1][2];
}
int barsToLoad = daysToLoad * 1380;
if (CurrentBar < barsToLoad || CurrentBars[0] < barsToLoad || CurrentBars[1] < 3)
{
if (showOutput && !backTest)
{
Print("Bars Count Requirement Not Satasfied, Waiting to load bars...");
Print("Bars loaded for Chart series: " + CurrentBar);
Print("Bars loaded for primary series: " + CurrentBars[0]);
Print("Bars loaded for secondary series: " + CurrentBars[1]);
}
return;
}
if (showOutput && !backTest) Print("loading Logic... Good Luck!"); PrintSettings();
Strategy enabled: 3/11/2024 12:22:51 PM
Strategy Settings...
Bars: panel=0 MNQ 03-24 1 Minute; Moving average over a Volume [7309-7609] time(0)=3/4/2024 1:34:00 AM time(count-1)=3/11/2024 12:23:00 PM
Instrument: MNQ 03-24
Timeframe: Minute Type #4 Value: 1 Time Period: 1 Value 2: 1
Bars on chart: 7610
---------------------------------------------------------
Setup...
Account: Sim101
Calculate: OnEachTick
Maximum bars look back: Infinite
Bars required to trade: 20
Start behhavior: WaitUntilFlat
---------------------------------------------------------
Historical fill processing...
Order fill resolution: Standard
Fill limit orders on touch: False
Slippage: 0
---------------------------------------------------------
Order handling...
Entries per direction: 1
Entry handling: UniqueEntries
Exit on session close: False
Stop & target submission: PerEntryExecution
---------------------------------------------------------
Order properties...
Set order quantity: Strategy
Time in force: Gtc
---------------------------------------------------------
Backtest: False
NinjaScript Output: True
Trace Orders: True
Version: v0.0.0.1-Last updated: 29-Feb-2024
Long 1 Quantity: 3
Short 1 Quantity: 3
Long 2 Quantity: 3
Short 2 Quantity: 3
---------------------------------------------------------
Bars Count Requirement Not Satasfied, Waiting to load bars...
Bars loaded for Chart series: 1253
Bars loaded for primary series: 7609
Bars loaded for secondary series: 1253

Comment