Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Scaling in then all out
Collapse
X
-
Scaling in then all out
When scaling in at different price levels and then exiting all positions at one price, is it necessary or best to use unique entry names or is not necessary at all? Can this senario be achieved with no entry names at all?
ThanksTags: None
-
Bertrand
Is there a way to cancel the Buy1 target and combine the 2 targets to the Buy2 exit with a quantity of 2, 4 ticks from the Position.AvgPrice?
Or does it need to be handled individually: Buy1 target = Buy1 Entryprice + 2 and Buy2 target = Buy2 Entryprice + 6?
ThanksLast edited by kenb2004; 06-25-2012, 09:46 AM.
Comment
-
Ken, if you work with the Set methods this would not be possible, as you can't cancel them only move closer or further away. When you work with the Exit() methods you could cancel an individual exit order and submit a final exit order for example with a emtpy ("") tag so it would 'catch' all orders.BertrandNinjaTrader Customer Service
Comment
-
So continuing with this senario, using IOrders and no Set Methods, would this way work?
protected override void OnOrderUpdate(IOrder order)
{
if (buy2entry != null && buy2entry == order){
if (order.OrderState == OrderState.Filled){
if (buy1target != null)
CancelOrder(buy1target);
buy2target = ExitLongLimit(0, true, 2, Position.AvgPrice + 4 * TickSize, "Buy_1&2_Profit", "");
} } }
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
41 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
11 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
1 view
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
||
Started by Philippe56140, Today, 02:35 PM
|
0 responses
3 views
0 likes
|
Last Post Today, 02:35 PM | ||
Started by 00nevest, Today, 02:27 PM
|
0 responses
2 views
0 likes
|
Last Post
by 00nevest
Today, 02:27 PM
|
Comment