![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Member
Join Date: Feb 2012
Posts: 39
Thanks: 0
Thanked 0 times in 0 posts
|
Hi all,
i'm receiving a lotof this error: "An over fill was detected on order...", in my strategy i enter on market with EnterLong() set stoploss "intratrade" with SetStopLoss() and close my position if i reached the stoploss or if i get the exit condition (my exit code is ExitLong() in this case).... What is the cause of the error "An over fill was detected..."?? Beacause i use both SetStopLoss() and ExitLong() ? thanks to all that answer to me! wyatt |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Wyatt,
You can try the following : http://www.ninjatrader.com/support/h...reoverfill.htm However it may cause a condition that isn't desired. If you could post your code I would be happy to look over it an identify perhaps why an overfill is occurring.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Feb 2012
Posts: 39
Thanks: 0
Thanked 0 times in 0 posts
|
an example, this is what's happen..
http://imageshack.us/photo/my-images/690/imageqbh.jpg/ there is both "StopLoss" reached and "Buy To Cover" for ExitShort... so, an over fill exception was throwed... Any ideas? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
wyatt,
You probably have two exits being called at the same time due to two sets of conditions possibly occuring at the same time. You could try to use If / Else if statements to separate your code logic into mutually exclusive conditions/actions, or you can try adding extra conditions into your if statements to make it so the two exits don't occur at the same time. For example, suppose Condition1 and Condition2 could possibly happen at the same time. Code:
if( Condition1 )
{
// do action 1
}
else if ( Condition2 )
{
// do action 2
}
Please note that if you are in a long position for example, and you call EnterShort() and ExitLong() very shortly after it could possibly result in an overfill. This is just an example, not necessarily your case here. I would need to see how you are doing you order management in code to identify the precise reason here.
Adam P.
NinjaTrader Customer Service
Last edited by NinjaTrader_AdamP; 04-18-2012 at 07:39 AM.
|
|
|
|
|
|
#5 |
|
Member
Join Date: Feb 2012
Posts: 39
Thanks: 0
Thanked 0 times in 0 posts
|
for that issue with your indication i found a way to solution,
but another problem was presented: ![]() http://img811.imageshack.us/img811/9...nuovocaso2.jpg in this image i retrieve another "over fill" error because i had a stoploss order with an exitlong order at the same time... but i "launch" entrylong order in the first black circle... but is filled in the second black circle, just 4-5-6 candles after... is there a solution for this error (not "over fill" but to much shifting of an order)?? thanks! |
|
|
|
|
|
#6 | |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Quote:
As far as the second issue, I am not sure why that would happen. Are you using strictly "EnterLong"? If you are reluctant to share code in the forum, you can send a support request to support at ninjatrader dot com with ATTN : Adam in the message body and a link to this thread. We don't share our customers code as this is treated strictly confidential. Essentially, I would be able to offer much more specific advice if I could see the code.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Line inclination changes when I move it even "Snap Mode" set to "Disabled" | IkerCB | Miscellaneous Support | 10 | 04-07-2011 01:46 PM |
| "ERROR: HISTBACKFILL "$INDU" Hdr: 400 Service FAILED " | trader_rick1234 | Version 7 Beta General Questions & Bug Reports | 1 | 05-24-2010 08:01 AM |
| option to remove "buy ask" and "sell bid" on chart trader | leontancfa | Charting | 1 | 07-01-2009 01:23 PM |
| summary of "strategy realized" is not equal "account performance, total net profit"" | Fragolino | Miscellaneous Support | 1 | 02-19-2009 04:12 AM |
| Please add "Calmar" and "Sterling" ratios to Performance._Trades.TradesPerformance | Elliott Wave | Suggestions And Feedback | 2 | 06-10-2008 09:57 PM |