Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PaperTrading question.

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

    PaperTrading question.

    I am papertrading a strategy, before I trade it live. It uses daily bars to place limit orders:

    I am using IQFeed as a datasource.

    It is a pretty simple strategy I pasted some code snippets below.

    Code:
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Initialize() {[/SIZE]
    [SIZE=2]BarsRequired = maPeriods;[/SIZE]
    [SIZE=2]QuantityType = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]QuantityType[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Strategy;[/SIZE]
    [SIZE=2]EntriesPerDirection = 1;[/SIZE]
    [SIZE=2]EntryHandling = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]EntryHandling[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].UniqueEntries;[/SIZE]
    [SIZE=2]ExitOnClose = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
    [SIZE=2]TimeInForce = Cbi.[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]TimeInForce[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Day;[/SIZE]
    [SIZE=2]CalculateOnBarClose = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
    [SIZE=2]}[/SIZE]
     
    [SIZE=2][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] OnBarUpdate() {[/SIZE]
    [SIZE=2]...[/SIZE]
    [SIZE=2]TryEnter();[/SIZE]
    [SIZE=2]...[/SIZE]
    [SIZE=2]}[/SIZE]
     
    [SIZE=2][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] TryEnter() {[/SIZE]
    [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]...[/COLOR][/SIZE][/COLOR][/SIZE]
    [SIZE=2]EnterLongLimit(GetNumSharesToBuy(Close[0]), Close[0], [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
    [SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]...[/COLOR][/SIZE]
    [/COLOR][/SIZE][SIZE=2]}[/SIZE]
    [/SIZE][/SIZE]
    Questions:
    1. I just placed and order with an average price of 0 and I am not sure why?
    2. I am going to be using MB Trading to trade live and I tried to setup the IQFeed commions to be what they would be with live trading, but I do not think I have it set up right Are the commitions setup right?
    3. Should the software have placed 3 trades?

    See attached pictures.

    Thanks,
    Erik
    Attached Files

    #2
    Erik, thanks for the post - can you please send me the logs / traces from your test to investigate, the 0 AvgPrice looks suspicious, it should have been updated after the fills for your limit order. You can use the Help > Mail to Support feature to send those over to us.

    When using MBT and NinjaScript strategies in combo, please be aware of the disclaimer we added to the MBT account creation process -

    MB Trading position events are generated before orders are executed. Since NinjaTrader relies on execution events to come prior to position events, you will experience limitations with tracking positions from the Strategies tab of the Control Center and trying to rely on the standard sequence of events (order execution before position) in NinjaScript.

    From the executed fills, I think the commissions are correct - you pay the minimum of 4.95 up to 500 shares and then per each additional share the 0.00075$.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I tryed to get the mail to work last night. Tryied with using defaults and tryed using my outgoing smtp server and user name and password and both failed. I will just manually mail you the trace files maybe you can see in there why my mail isn't working too.

      Why the 3 trades to execte the order? Should I expect this in real time should I expect triple comminsions for orders? I am still a little confused on the orders and comisions and exactly how they work.

      Thanks,
      Erik

      Comment


        #4
        Thanks, I'm looking forward to your files to investigate - did you already receive a ticket # I can review?

        You could receive a partial fill, meaning your full order qty is split up in individual fills, depending on size and available liquidity this will happen in realtime trading, too.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I sent of the trace files you should have them. I am not sure what you mean by a ticket # ?

          Comment


            #6
            Just replied - the ticket # will be assigned to each email we get - you would see it listed in our auto response send after the email was received, this will allow us better internal tracking and monitoring of customer cases.

            Thanks,
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ZenCortexHurry, Today, 01:07 PM
            0 responses
            2 views
            0 likes
            Last Post ZenCortexHurry  
            Started by ZenCortexHurry, Today, 01:04 PM
            0 responses
            1 view
            0 likes
            Last Post ZenCortexHurry  
            Started by f.saeidi, Today, 12:14 PM
            3 responses
            9 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Russ Moreland, Today, 12:54 PM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by philmg, Today, 12:55 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Working...
            X