Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Some questions

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

    Some questions

    To finalize my automated trading system with integrated money- and riskmanagement I have following questions:


    1) with which command can I set multiple targets when I would like to split the exits

    2) how is it possible to determine the timeframe, the strategy is actually running in, to change the behaviour of the strategy

    3) to open an dialog I would need, a visual parent of the strategy. When I start the strategy from a chart, the 'Chartcontrol' works fine.
    But when I start the strategy directly from the strategy-tab, the Chartcontrol is not initialized. Is there another parent-object which I could use
    or does a common visual parent-Object exist to a strategy.

    4) how can I determine the actual stop price of a position

    5) is it possible to dynamically find out the base currency of an instrument: FDAX = EUR, YM = USD, SMI = CHF,...??

    6) I also would like to get the actual equity - there is a variable 'accountsize' but it has to be initialized with a static value - I would need to
    determine it dynamically.

    many thanks for your help

    #2
    1) Here is a reference sample demonstrating how to scale-out: http://www.ninjatrader-support.com/v...ead.php?t=3751

    2) You can access this through BarPeriods.

    3) Unfortunately that is not supported.

    4) What do you mean stop price of a position? The stop price of your order will be whatever you submitted it as.

    5) You would need to manually program out logic to do that.

    6) This is currently not available. Thank you for your suggestion.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Dynamic Accountsize Not Available???

      Josh, I do not understand why dynamic accountsize is not currently available for Forex in NT. Do you know when it will be available?

      My risk management strategy is to limit the size of my position to 2% of my account equity at all times. How can I do this in an automated strategy if I have to manually calculate and statically define a variable for accountsize that will change after each trade? As great as NT is, proper risk management is the most important thing to me to ensure survival and longevity in the Forex markets.

      With MetaTrader4, dynamic addressibility to an account balance is available to an expert advisor. As NT is more robust than MT4, I am really surprised and disappointed this functionality is lacking.

      Any assistance you can provide me and the other Forex traders in this forum will be greatly appreciated.

      Respectfully,
      Andy

      Comment


        #4
        One of the reasons is that not all of our broker providers send us account balance information. You will have to code this yourself by introducing a variable (input) that you can set as your account balance and then using properties in our Performance class (link below) to update the current cash value. Unfortunately we do not have any reference samples available.

        RayNinjaTrader Customer Service

        Comment


          #5
          Dynamic Accountsize Not Available???

          Thanks for your reply Ray.

          Please address all of the following questions, as I am in the process of making a technology decision which is riding high on this issue.

          One of the reasons is that not all of our broker providers send us account balance information.

          1.) What are the other reasons?

          2.) Which brokers do support this functionality?

          3.) When will this functionality be globally supported in NT? Again, this is currently available in MetaTrader4 as a platform default.

          You will have to code this yourself by introducing a variable (input) that you can set as your account balance and then using properties in our Performance class (link below) to update the current cash value.

          4.) In lieu of the fact of a big gaping hole to properly address risk management in an automated trading environment, can someone from NT or the NT user forum provide a wokring solution, until a formal NT solution is available?

          Thanks in advance for your help.

          Andy

          Comment


            #6
            1) No other reason other than we have not included it.
            2) I am not 100% sure and it would not matter since you can not currently access this value programattically. You will be able to with NT7.
            3) In NT7 you will be able to access account value programattically
            4) This is on our list for the future, I can't estimate when but no time soon.
            RayNinjaTrader Customer Service

            Comment


              #7
              Multiple targets

              Originally posted by NinjaTrader_Josh View Post
              1) Here is a reference sample demonstrating how to scale-out: http://www.ninjatrader-support.com/v...ead.php?t=3751
              Hi Josh

              Many thanks for your answers

              Unfortunately the solution for scaling out positions into multiple targets is not that simple as it is coded in the example.

              I have already implemented a money/risk management-popup in my strategy - that works very well.

              Based on the signal the entry price, the entry position size, stop price and a target strategy is going to be proposed. The target strategy can support up to three different targets were the target price and the target size is already dynamically calculated (based on the initial risk). At the popup it is also possible to adjust the target prices and -sizes.

              So the SetProfitTarget-method doesn't work because this function doesn't contain a quantity parameter.

              Now I tried to use the ExitLongLimit-method for Long-trades and ExitShortLimit for short trades to set different targets. This also doesn't work. The log list shows a message to check the order entry rules in the helpfile.

              Do you know how the ExitLong....-methods have to be used.

              many thanks in advance

              Comment


                #8
                Hi,

                You will need to check the internal order handling rules. Please review them here and evaluate your strategy for any potential breaks against these rules: http://www.ninjatrader-support.com/H...verview36.html

                If any of them are broken your orders will be ignored.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Multiple targets

                  Originally posted by NinjaTrader_Josh View Post
                  Hi,

                  You will need to check the internal order handling rules. Please review them here and evaluate your strategy for any potential breaks against these rules: http://www.ninjatrader-support.com/H...verview36.html

                  If any of them are broken your orders will be ignored.

                  That is quite hard to understand (I'm not a native english speaker) - but I cannot really make out a mistake - let's try it on the following example. Maybe you can tell me on the following description, what's wrong with my source code.


                  A position is going to be opened with

                  EnterLongStop(0,true, 5, 4985, 'confirmed hook');

                  In the OnExecution-Event I first call the method

                  SetStopLoss('confirmed hook', CalculationMode.Price, 4975, false);

                  after that I try to set the targets:

                  ExitLongLimit(0, true, 3, 5000, 'confirmed hook target 1', 'confirmed hook');
                  and

                  ExitLongLimit(0, true, 1, 5010, 'confirmed hook target 2', 'confirmed hook');
                  and

                  ExitLongLimit(0, true, 1, 5015, 'confirmed hook target 3', 'confirmed hook');






                  Do you see what's wrong ?

                  The exit-orders are ignored by the system - the stop order works
                  Last edited by TheChingachgook; 10-21-2008, 12:14 PM.

                  Comment


                    #10
                    Yup. You are hitting this rule:

                    Methods that generate orders to exit a position will be ignored if a strategy position is open and:
                    • An order submitted by a set method (SetStopLoss() for example) is active
                    You cannot have a Set() method active when you try to submit manual Exit() orders.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Josh View Post
                      Yup. You are hitting this rule:

                      Methods that generate orders to exit a position will be ignored if a strategy position is open and:
                      • An order submitted by a set method (SetStopLoss() for example) is active
                      You cannot have a Set() method active when you try to submit manual Exit() orders.

                      OK - so what could be the solution ?

                      How do I have to handle the stop-order ? Do I have to use the ExitLongStop () - method together with the ExitLongLimit() orders ?

                      Comment


                        #12
                        That is correct. Use ExitLongStop().
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Josh View Post
                          That is correct. Use ExitLongStop().
                          Great - many thanks for your help

                          By the way - the support for Ninja-Trader is one of the best - no - is the best support forum for a software-application I've ever seen. (I'm an IT-consultant since about 20 years)

                          good job guys - keep on holding this quality

                          Comment

                          Latest Posts

                          Collapse

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