Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cant Short in Market Replay

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

    Cant Short in Market Replay

    Hi,

    I have a strategy that errors as soon as it hits the first short with an error of insufficient equity. I get one Long fill for a $4 loss, then the next it hits is the short.

    Cheers

    20/01/2013 17:57:11 Order Market Replay Connection, Order has exceeded available account equity: Please reduce order size affected Order: SellShort 200 Market

    THEN IT EXITS

    20/01/2013 17:57:11 Strategy Strategy 'BollRSIStopRatio/8177aba17e054b3b91974213f0d93387' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.



    This is the order rejection

    20/01/2013 17:57:11 Order Order='0bf64b4bbebf4b259576663a8aa0d00d/Replay101' Name='Enter Short' New state=Rejected Instrument='$EURCHF' Action=SellShort Limit price=0 Stop price=0 Quantity=200 Type=Market Filled=0 Fill price=0 Error=OrderRejected Native error='Order has exceeded available account equity: Please reduce order size'

    #2
    Hello,

    Please ensure the account size is large enough to be trading 200 lots on $EURCHF

    If you need to increase your funds please reset your sim account.
    Resetting a simulation account will clear all historical trade data from this account. Please follow the instructions below to reset a simulation account.
    • From the NinjaTrader Control Center window select the menu Tools > Options
    • Select the "Simulator" tab
    • Press the "Reset" button




    Please let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi,

      I had considered that, but the Long entry that took place just prior was for 200 as well. I had noticed the section where In test it is Base units, but through the broker it is lots, but i thought that was just because brokers deal in lots.

      Are you saying that even on Market replay it considers it to be lots? That is the Rpley101 account trades in lot sizes as a broker would?

      I'll try reducing it anyhow. Would like to know why long works and not short?

      Cheers

      Comment


        #4
        Thanks Lance,

        That has worked. Still Curious as to why the Short did not Fill but the long did?

        Cheers

        Comment


          #5
          Originally posted by Aussiemike View Post
          Thanks Lance,

          That has worked. Still Curious as to why the Short did not Fill but the long did?

          Cheers
          You said that the first trade was a loss, so it would seem to me that that loss took your equity too low? I would suggest that you use the TradesPerformance methods to check that.

          Comment


            #6
            Cheers will check that.

            I'm running over the same time period again and again. Sometimes it seems to respect multi time frames others it does not. 1 time quite sure it bought and sold inside of the 1 candle after i paused replay and changed chart to 1min from 5 to investigate the internals it shifted out to be on the correct bars?

            Any ideas on that? Seems inconsistent.


            Just checked. I lost 8c on a $10k (account) i had changed the simulator tab to be margin and maintenance of .10, but purchasing power shows a 16c drop, so that's clearly not worked?

            Based on the amount of profit/loss it definitely seems to me this is dollar units and not lots in market replay... can you confirm this? If so then how can $9999.92 in cash with buying power of 19,999.84 not be enough to handle $200?

            Cheers

            Comment


              #7
              Hello,

              I'm running over the same time period again and again. Sometimes it seems to respect multi time frames others it does not. 1 time quite sure it bought and sold inside of the 1 candle after i paused replay and changed chart to 1min from 5 to investigate the internals it shifted out to be on the correct bars?
              If you're changing time frames when the strategy is running you will be restarting the strategy. How the restart is handled is determined by your settings.

              Please see this section for more details (tools -> options -> strategies tab -> ninjascript tab) : http://www.ninjatrader.com/support/h..._positions.htm

              Just checked. I lost 8c on a $10k (account) I had changed the simulator tab to be margin and maintenance of .10, but purchasing power shows a 16c drop, so that's clearly not worked?

              Based on the amount of profit/loss it definitely seems to me this is dollar units and not lots in market replay... can you confirm this? If so then how can $9999.92 in cash with buying power of 19,999.84 not be enough to handle $200?
              Perhaps I need some further clarification on your settings. The 200 should be lot size, what instrument are you trading on?

              It may help if you provide a screenshot of what you're seeing

              To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
              For detailed instructions please visit the following link

              I look forward to assisting you further.
              LanceNinjaTrader Customer Service

              Comment


                #8
                Analysis

                Hi Lance,

                I actually use "Boot camp" on a mac so the screenshot controls are completely different.


                There wasn't a lot of info about what you wanted to see. Was hoping you might be aware of some lace for settings that can likely affect this.


                Anyway i've done some screenprints for you.

                I show the account prior to start and the simulator settings tab. Although this is Rplay101 account i have a feeling there is some common properties..?

                Long200_Ghostprices is a full screenprint. On it you can see in the Chart of $EURCHF that 200L was infact entered (It's done it as 199 and 1...maybe to do with default fill properties?). You can see in the strategies tab in the top/left of the screen that it is 200L. You can see the average fill price (also visible on the chart). For some reason it has entered the deal at a price that never existed on the screen. Data box is there to the laft to see this as well.

                Account_cash_buying_power shows the accounts tab. Cash value and buying power. Looking at those values there i find it hard to believe that 200 is 200 lots. 200 Lots of EURCHF at these prices is somewhere around $15million USD, but it's only used up $2 of my buying power?!

                Then we have the errors flash up. As i mentioned the issue is only on Short. So what is the different behaviour here? Is there some setting to allow Short on margin or not?

                I've included the log as well. So you can see it is the Exit message for the 200Long that blows the account.

                Look forward to your response.

                Cheers
                Attached Files

                Comment


                  #9
                  additional screenshots due to 5 limit
                  Attached Files

                  Comment


                    #10
                    Hello,

                    Can you attach a simplified version of your strategy which replicates this error so that I may test on my end?

                    Located in (MY)Documents\NinjaTrader 7\bin\Custom\Strategy

                    Additionally, when trading Forex strategies please read the following for sizing information: http://www.ninjatrader.com/support/h...strategies.htm
                    LanceNinjaTrader Customer Service

                    Comment


                      #11
                      Replay_test

                      Hi LAnce,


                      I've attached a trimmed down version of a Strategy. You may have noticed i've had other difficulties with Market Replay, but in creating this trimmed version i was able to see and correct a couple of things, so looking much better.

                      The issue of Shorting and contract size still remains. I don think it is anything in the strategy, but use this anyway, as it is a test one that is giving me shorting errors.

                      You could use any old currency, but for consistency i'm on the FOREX not the futures. Instrument is $AUDUSD Date 07/01/2013 Market Replay Data.


                      This what i do

                      Goto 08:04:58 This is just before a long trade.
                      Add the strategy to the chart by clicking the $ icon.
                      Set Contract size to 100000
                      Hit Play...fwd through until the exit
                      It gets 7pips and my account shows a profit of $70 This is exactly what i would expect in the real world trading $100000 in Currency or 1 full Lot.


                      *** Short Error *****

                      Now Speed her up and stop before you get to 09:19:57
                      Now the order Quantity is still the same, and we now have an extra 70 in cash and 140 in Buying power. Let it play to the entry in 3 seconds time, and Crash!


                      Now if you run through with 1 and with 10 yes it does work, but the PnL for those os not the PnL for Lots, so something is not right, and why just on the short?

                      Cheers
                      Attached Files

                      Comment


                        #12
                        Hello,

                        I'm not yet able to replicate the error on my end as it seems to handle both long and short entries/exits without throwing me this error.

                        What Session Template and period are you using on your chart.

                        What Time zone are you in? I tried using UTC +11 to see if this caused the error but still the same results as my current time zone UTC -7

                        Also, I'm assuming the times given are AM and not PM, let me know if this is not correct.

                        I look forward to assisting you further.
                        LanceNinjaTrader Customer Service

                        Comment


                          #13
                          Lance,

                          I'm in London so GMT timezone.

                          I'm not thinking this would make too much difference. I think the issue is the account, not timezones or strategies.

                          So my account for some reason is treating Long and short differently. One is working in Lot sizes, and the other is working in retail sizes.

                          Have you entered a small short using 1 as though it were a lot size? The PnL is pathetic it is definately not the PnL for a Lot.

                          Can you tell me what if any settings i should have/change were on the account? Is there anything about allowing shorts or different short behaviour?

                          Cheers

                          Comment


                            #14
                            Tried MA Crossover. Had to use the Set default Quantity to change the size.

                            It works Long and Short. Using the set default Quantity works on the test strategy as well.

                            So what is wrong with how the Quantity is defined using the strategy? How does that differ in logic?

                            Still different between long and short..?

                            Cheers

                            Comment


                              #15
                              Hello,

                              After testing several different times I have not been able to replicate the error.

                              The only time I'm able to get an order submission error is when not enough market replay data has been downloaded. When this happens it gives the error you mentioned but it's paired with another error in regards to replay data.

                              Please send mail to support [at] ninjatrader [dot] com and reference this thread http://www.ninjatrader.com/support/f...php?t=55252%27

                              and in the email provide a phone number and time/time zone you can be reached for us to perform a remote assistance.
                              Attached Files
                              LanceNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              630 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              364 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              565 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              568 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X