Prevent the stop loss from being updated after the trade has been entered
This commit is contained in:
parent
55b6abf526
commit
fdba098f52
@ -50,11 +50,14 @@ namespace NinjaTrader.NinjaScript.Strategies
|
||||
|
||||
protected override void OnBarUpdate()
|
||||
{
|
||||
if (PrimaryBars != BarsInProgress)
|
||||
return;
|
||||
|
||||
// TODO: Make this timezone-agnostic.
|
||||
if (ToTime(Time[0]) <= 70000)
|
||||
return;
|
||||
|
||||
if (PrimaryBars != BarsInProgress)
|
||||
if (Position.MarketPosition != MarketPosition.Flat)
|
||||
return;
|
||||
|
||||
if (Open[0] < OR.ORH[0] && Close[0] > OR.ORH[0])
|
||||
|
Loading…
Reference in New Issue
Block a user