I have written a NinjaScript strategy to "calculate on bar close" and that upon certain conditions, a stop limit order is to be entered, but how do I also tell it that when that order is filled a stop loss must be entered which is equal to the high closing price 1 bar ago?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Simulated Stop Loss Market Orders for Automated Trading
Collapse
X
-
NinjaScript stop loss setting
I have written a NinjaScript strategy to "calculate on bar close" and that upon certain conditions, a stop limit order is to be entered, but how do I also tell it that when that order is filled a stop loss must be entered which is equal to the high closing price 1 bar ago?
-
djdinut1, you can call SetStopLoss for this and designate the Close[1] price value to be used - http://www.ninjatrader-support.com/H...tStopLoss.html
aljafp, sorry missed the code posted earlier.
1. Please clarify with your broker what orders types are supported for the HSI - it could be StopMarket orders are not supported and thus synthetically simulated on PATS, an order type which we unfortunately do not support.
2. Please clarify with your broker as per 1
3. Unfortunately those synthetic orders types are not supported, thanks for the suggestion.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Bertrand View Postdjdinut1, you can call SetStopLoss for this and designate the Close[1] price value to be used - http://www.ninjatrader-support.com/H...tStopLoss.html
aljafp, sorry missed the code posted earlier.
1. Please clarify with your broker what orders types are supported for the HSI - it could be StopMarket orders are not supported and thus synthetically simulated on PATS, an order type which we unfortunately do not support.
2. Please clarify with your broker as per 1
3. Unfortunately those synthetic orders types are not supported, thanks for the suggestion.
I am testing my codes with IB first.
And i am getting this problem with IB which i am very surprise, since IB simulates StopMarket Orders for HSI and i am surprise Ninja cannot handle.
I suspect its an issue with ATI interface, because i tested using a ninjascript strategy with IB , and StopMarket orders are send properly.
So i believe problem lies with the ATI interface.
As for supporting synthetic stop orders with Patsystems, according to openquant, they will just send the stop orders via Patsystems API.
If the broker's implementation supports synthetic stop orders, it will just be send to the SyOMS server. So its transparent to them. So i am again surprise that Ninja cannot support.Last edited by aljafp; 02-12-2010, 05:16 PM.
Comment
-
Originally posted by NinjaTrader_Bertrand View Postaljafp, as noted the PATS synthetic ordertypes are unfortunately not supported by us - for your testing with IB, please send us your trace and log files via the Help > Mail to Support feature, this will give us better insight into your issue, thanks.
Comment
-
aljafp,
Code was needed to see you are not just typing in incorrect code which happens very often. Logs and traces are needed to be able to analyze the scenario. After analyzing then we can see if it is a setup issue, an intrinsic issue as mentioned earlier by Bertrand and Jason, or some other issue. Please provide as requested. Thank you.Josh P.NinjaTrader Customer Service
Comment
-
I just saw this thread after i Googled 'poor fills' on the HSI. I am trialing a strategy from a third party and i assume i am the first to try through IB and NT on the HKFE's HSI. I am getting some wild fills on IB simulator. At times my market order gets filled 50 - 60 points away from the market..with catastrophic results..as one can imagine!
Is there a work around for this?
Obviously I cannot see the code...but the third party is an NT partner.
Cheers,
CanOz
Comment
-
Both, but the trouble is with IB's paper trader for sure. Market replay, and the NT SIM is fine.
Comment
-
-
The market orders executed through Interactive Brokers TWS execute at market. Where anything executed through NT at market gets filled erratically. I have confirmed this today.
CanOz
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
5 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,289 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
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
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
24 views
0 likes
|
Last Post Today, 09:41 AM |
Comment