Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
stop loss porblem
Collapse
X
-
stop loss porblem
I have a stop loss strategy set up as SL 10 ticks and profit target 40 ticks. Since i am a trend trader so as the the trend as my direction, i usurally add more position. I have been testing my strategy for the past a couple of day. The porblem appeared was once i added the second or the third positon, the stop loss became 40 ticks instead of 10 ticks. I had to manually move it to 10. Never had any problem with first position though. Is that a bug or something?Tags: None
-
Hello peterhxu7.
Thanks for the note.
I tested this scenario. I placed my SetProfitTarget and SetStopLoss in State.Configure and made the strategy take a position on bar 0 and then another one on bar 1 with the code below:
PHP Code:private bool flip = true;
protected override void OnBarUpdate()
{
if(State == State.Historical) return;
if (Close[0] > Open[0] && flip)
{
flip = false;
EnterLong(1);
}
if (Close[0] > Open[2] && Position.MarketPosition == MarketPosition.Long)
{
EnterLong(1);
}
}
I look forward to assisting further.Chris L.NinjaTrader Customer Service
-
Hello peterhxu7,
Thanks for the reply.
In my testing, the stop loss is not moved if I scale up the position at a different price level.
What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About
What instrument (and expiry if applicable) have you selected? For example, ES 09-18, AAPL, EURUSD, etc.
Can you provide screenshots, or possibly a video of this happening with an ATM Strategy? Also, a screenshot of the ATM Strategy setup will help as well.
I look forward to your reply.Chris L.NinjaTrader Customer Service
Comment
-
Hello peterhxu7,
Thanks for the reply.
If you are able to reproduce this issue every time you try to scale up your position with an ATM Strategy, there could be some bad item in your NinjaTrader database.
Please follow the instructions below to reset the NinjaTrader database. (This can take longer depending on the size of your database file and your system.)
- Disconnect NinjaTrader from any open connections via File > Disconnect.
- From the NinjaTrader Control Center window select the menu Tools > Options.
- Select the 'Data' tab.
- Press the 'Reset DB' button.
- Press the 'OK' button.
The following data will be removed.
- Historical orders.
- Historical executions.
- Historical ATM strategy data.
- Saved Strategy Analyzer backtest results.
After you do this, test the ATM Strategy again and let me know if you get the same results.Chris L.NinjaTrader Customer Service
Comment
-
thanks. I retested using simulated data. It worked as long as i chose the ATM strategy again before i placed the next order. I guess the system does know if you want to use the same stop loss and profit target as default. it's a bit anoring but i think i 've solved the porblem.
Comment
-
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
27 views
0 likes
|
Last Post Today, 05:11 AM | ||
Started by PaulMohn, Today, 03:49 AM
|
0 responses
7 views
0 likes
|
Last Post
by PaulMohn
Today, 03:49 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
1 response
9 views
0 likes
|
Last Post Today, 02:18 AM | ||
Started by rocketman7, Today, 02:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
4 views
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
Comment