Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Repetitious cancellation orders grinding system to a halt
Collapse
X
-
if (reversalPrice != null)
{
if (Position.MarketPosition == MarketPosition.Long && Close[0] >= reversalPrice)
{
SetStopLoss(CalculationMode.Ticks, 5);
EnterShort(DefaultQuantity, "Scalp sell");
EnterShort(DefaultQuantity, "Sell short");
reversalPrice = null;
}
else if (Position.MarketPosition == MarketPosition.Short && Close[0] <= reversalPrice)
{
SetStopLoss(CalculationMode.Ticks, 5);
EnterLong(DefaultQuantity, "Scalp buy");
EnterLong(DefaultQuantity, "Buy");
reversalPrice = null;
}
}
Comment
-
SetProfitTarget is used only in the initialize section:
protected override void Initialize()
{
SetProfitTarget("Scalp sell", CalculationMode.Ticks, 8);
SetProfitTarget("Scalp buy", CalculationMode.Ticks, 8);
SetProfitTarget("Buy", CalculationMode.Ticks, 16);
SetProfitTarget("Sell short", CalculationMode.Ticks, 16);
IncludeCommission = true;
TimeInForce = Cbi.TimeInForce.Day;
EntriesPerDirection = 1;
TraceOrders = true;
EntryHandling = EntryHandling.UniqueEntries;
}
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by SantoshXX, Today, 03:09 AM
|
0 responses
11 views
0 likes
|
Last Post
by SantoshXX
Today, 03:09 AM
|
||
Started by DanielTynera, Today, 01:14 AM
|
0 responses
2 views
0 likes
|
Last Post
by DanielTynera
Today, 01:14 AM
|
||
Started by yertle, 04-18-2024, 08:38 AM
|
9 responses
41 views
0 likes
|
Last Post
by yertle
Today, 01:00 AM
|
||
Started by techgetgame, Yesterday, 11:42 PM
|
0 responses
12 views
0 likes
|
Last Post
by techgetgame
Yesterday, 11:42 PM
|
||
Started by sephichapdson, Yesterday, 11:36 PM
|
0 responses
2 views
0 likes
|
Last Post Yesterday, 11:36 PM |
Comment