Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Overfill errors forex mbtrading

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Overfill errors forex mbtrading

    Hi,

    Well, one of my strategies have be running great for months in the forex market on MBTrading. I have not changed anything on it. However, a few days ago I just started receiving "Overfill" errors. It would show the notice upon entry and then close the position immediately and turn off the strategy. What is causing this? How can I fix and be sure it does not happen in the future?

    I do not have any reversal commands in my strategy. They enter (only 1 lot too by the way...not multiple lots and multiple legs in or out etc). They simply in or exit (1 lot all in or out).

    All entries and exits are market orders (no limits). They are all Day orders. Most of the errors seem to be off of the conditional exit I have it place for emergency exits (which is over 33 ticks).

    But, like I mentioned, nothing has changed with the strategy and it has been running fine for months. Also, this does not happen with Futures (but it is essentially the same Strategy adjust for the nuances of the Futures market vs the forex market only)

    Example error message:
    An over fill was detected on order 'Order='2hwe65k:01s8/xxx2xxx' Name='EMR ExL' State=Filled Instrument='$GBPAUD' Action=Sell Limit price=0 Stop price=0 Quantity=1
    000 Strategy='FXXX1FX' Type=Market Tif=Gtc Oco='' Filled=1xxxx Fill price=1.70996 Token='316f85e2384b49f1ad23743aac4be747' Gtd='12/1/2099 12:00:00 AM'' generated by strategy 'FXXX1FX/cae63186f9bd45a186e7b32afa7c5124' : This strategy will be disabled and NinjaTrader will attempt to cancel/close any strategy generated orders and positions. Please check your account orders and positions and take any appropriate action.

    So, right now, any forex position entered is soon exited (if not immediately) in most cases.

    Thanks guys...


    #2
    Hi birdog, sorry to hear about those issues - would you mind forwarding your logs and traces from those occurences to support via Help >> Mail to Support so they could be reviewed for the exact event sequence seen?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      1/10 setting in the FX PIP options

      Ok, I think I "might" be close to figuring it out now...not 100% yet though. Because the strategy had been working flawless for many many months (actually over 2 years) without this kind of a error, I had to really think about everything I had recently changed.

      I remembered something I had changed but NOT in the strategy itself. I had recently changed in the options setting form PIP to 1/10th of the pip for forex. So, I think that may be the problem. The emergency exits had been going off correctly but because I changed it in from PIP to 1/10th of a pip it may be the reason it is going off pretty quickly. With MBTrading it asks to set it to 1/10th.

      So, my questions now are:

      1. How would the regular stop be effected (the standard stop put in the strategy parameters window)? For example, I want a 30 FULL PIP stop. If I put 30 in the window (with this 1/10th setting) is it effectively set to only 3 pips? I need 30 full pips.

      2. In regards to the Strategy, one of the conditions of the emergency stop (which was part of the recent problems) is:
      Code:
      && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) < -33*TickSize
      With the pip size set to 1/10th of a pip now, how is this code interpreted by NT. Right now, I think the problem is that it is firing off at only 3.3 pips (not the intended 33 FULL PIPS) as a result?

      I believe this may be causing this overfill condition and hence the Strategy shuts liquidates and then shuts down.

      Does it need to read -330*TickSize (which I think is confusing but probably will work if the 1/10th setting is the issue, remove the *TickSize, or adjust something else? I want it to make reasonable sense in the code and be as clean as I can. I also would like the parameter number that is set in the window upon Strategy startup to mean the same thing (as far as the number meaning) as whatever the code ends up being as well to avoid confusion.

      I am now testing but would appreciate input on #1 and #2 above.

      ***Also, is it absolutely required to have the 1/10 per pip setting for MBTrading or not? I prefer a setting of a full pip if possible. However, it is not required (I will do what I need to do)...

      Last edited by birdog; 11-14-2013, 08:54 PM.

      Comment


        #4
        GM Greg,

        If you're having MBT set to TenthPip then you would need to amend your strategy pnl statement as well of course, with 3.3 pips exit this is asking for overfill to come in.

        Just a trailing 0 then to your code for the pip size to get to pipettes.

        This would be true for the standard stop as well, 300 would be then 30 pips if you change the pips setting for FX.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by 00nevest, Today, 02:27 PM
        1 response
        8 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        8 views
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        7 views
        0 likes
        Last Post Philippe56140  
        Working...
        X