Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A few suggestions: commission management, acccess to account size, ...

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

    A few suggestions: commission management, acccess to account size, ...

    I've been working with this great program a bit now and I've come across a few things that might help to improve it even more that I'd like to share:

    1) Since I use CFDs as the instrument of choice to execute my strategies, I needed a bit more elaborate commission calculation and management for my backtests. Instead of simple commission levels I needed my fees to be calculated based on fixed, variable and minimum costs per transaction (i.e. total = max[quantity * price * variable + fixed, minumum]).

    For CFDs overnight fees are also relevant (fee = quantity * price * (bank rate +/- broker rate) / 365).

    Of course I was easily able to program all of this myself thanks to the great programming ability of NT. But maybe other people might need this too so it might be nice to have NT support this.

    The problem with my solution is that I now have to manage the account size etc. separately with my own code and therefore I also have to write my own statistic functions and cannot use the strategy analyzer.

    2) It would be nice to be able to access the current account size, for example to be able to calculate a position size based on the maximum risk (in percent of the capital) one is willing to take (for which the entry price, the initial stop loss and the current account size are needed).

    The problem is that if the QuantityType is set to "by account size" then I cannot explicitly set the quantity of an order. But on the other hand, if I set it to "by strategy" then I can set the quantity manually but then the AccountSize property is always zero.

    It were ideal if I could always read the account size while still being able to manually define the order quantity (which would allow me to implement my risk management/position sizing algorithm which needs both the ability to read the account size and explicitly define order sizes). If it were also possible to modify the account size, then I could also implement my custom commission handling (as stated in point 1 by simply substracting my custom commissions from the account after each trade) while still being able to use the statistics built into the strategy analyzer.

    3) Limit orders should fill (at least with the liberal fill strategy) with a better price than the limit price not only on a bar with a gap but also when the opening price is better than the limit (e.g. enter long order was placed at bar n with limit x, bar n+1 opens at y<x, order is filled at y).

    4) It'd be nice to be able to assign different colors to the bars in the volume histogram depending on if it was an up or down day (i.e. higher/lower closing than opening price).

    #2
    Thanks for taking the time to write.

    1) Thanks for the suggestion, we do have this on our list for future consideration.

    2) Account based properties will make it into NT7, things like buying power, pnl and cash balance.

    3) Thanks for the suggestion. You could create your own fill algorithm if you are advanced enough. We do not provide support for this but you can easily open up the algorithms in the \Type folder. Just search for them and use them as guidance to create your own.

    4) Would the VolumeUpDown indicator do what you want?
    RayNinjaTrader Customer Service

    Comment


      #3
      3) Yes, I even read the help file first and I just had a look at LiberalFillType.cs. Even though it shouldn't be a problem to implement since I'm actually more software engineer than trader anyway, I'm actually too lazy to think through the IFs now, it's not that important.

      4) Yes! Shame on me for not looking carefully enough!

      Comment


        #4
        PS: Another suggestion: It should also be possible to add more than one instrument at once (i.e. a whole selection) to a list in the instrument manager. Having to do it one by one is very tedious. The same goes for removing elements from a list.

        Comment


          #5
          Thanks for sharing your thoughts Terenyi. We will add it to the list of future considerations.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Another thing I came across: It would be nice to allow one indicator to have different plots in different panels. One example: I was trying to plot a moving average in the price panel and also have a bar diagram of the change of the MA in a separate panel (because it needs a different scaling). So far the only way to do this is by plotting in a separate panel and drawing the line in the price panel using DrawLine and DrawOnPricePanel = true which however creates a lot of line segments.

            Oh and it would be nice to have an option to lock all drawing objects so that clicking on one will not select it. When I have a lot of drawing objects then I often accidentially click on one when I try to move the chart around.

            Comment


              #7
              I've found out that the properties Trade.Commission and TradesPerformance.Commission can be written so I thought this might be an easier way to include my custom commission calculation. However, even though the manually set values are saved and some of them are also shown in the strategy analyzer, they are not considered in the calculation of the statistics (i.e. commissions should reduce performance etc.). A change here would probably the easiest way to allow people to use their own commission management.

              Another nice thing to have would be to allow to add custom data to each order which is then included in the statistics. For example, when placing an entry I would include the current ADX value so the strategy then knows what the ADX was when entering each trade. This can then be used to show the average ADX for winning and losing trades and so on which might help to draw further conclusions (e.g. in a trend following system losing trades might have been entered on a lower average ADX than winning trades).

              Another addition would be to consider the initial stop loss of each trade as this level defines the risk taken on each trade. Using this information statistics could be given in terms of "risk multiples" of each trade and their distribution which then can be used to calculate the expectancy of the system.

              BTW: I have found another workaround to plot an indicator in multiple planels which is by abusing a strategy, i.e. using the strategy as a container for multiple indicators which plot to a separate panel each.

              Comment


                #8
                Hello,

                Thank you for your suggestions. I sent this information to our develpoment department for consideration.
                DenNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by jclose, Today, 09:37 PM
                0 responses
                4 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,413 views
                0 likes
                Last Post Traderontheroad  
                Started by firefoxforum12, Today, 08:53 PM
                0 responses
                10 views
                0 likes
                Last Post firefoxforum12  
                Started by stafe, Today, 08:34 PM
                0 responses
                10 views
                0 likes
                Last Post stafe
                by stafe
                 
                Started by sastrades, 01-31-2024, 10:19 PM
                11 responses
                169 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X