Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

realtime strategy automation disabled?

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

    realtime strategy automation disabled?

    Is the automation of sending orders disabled since the newer version of NJ? i started some strategies, but there are absoluteley no orders started from each one.

    #2
    Hello IceRage,

    Automated strategy functionality has not been disabled in the latest version.

    Can you please check if you selected the correct account.

    Could it be the strategy conditions to submit orders have not been met yet?

    Do you receive any error messages in the Log-tab?
    JasonNinjaTrader Customer Service

    Comment


      #3
      hm ok, when the functionality isnt disabled, its my fault.
      thx.

      Comment


        #4
        Let me know if you need any assistance upon searching the cause of the strategies not submitting orders.
        JasonNinjaTrader Customer Service

        Comment


          #5
          yes thanks.

          i tried in backtesting mode and it works as it should be.

          some orange logentries showing this:
          Calculated target price for strategy 'e6m20a50' was smaller/equal 0. No target order placed.

          can i post any information to make it more clear?

          Comment


            #6
            IceRage,

            It means you are submitting some orders at invalid prices. As suggested by the message, your price cannot be < 0 and you would need to adjust this in your code so no such order is ever placed.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              if found the mistake. when i added a new strategy i had only choosen the instrument-name, but not the instrument-type in dataseries ...

              thx for your help.

              Comment


                #8
                Calculated target price for strategy 'strategy name' was smaller/equal 0. No target

                I am getting the same error message in automation at Interactive Brokers. It works in the simulated account.

                I am trading Soybeans and when the strategy goes short, it exits immediately and gives the error message,

                "Calculated target price for strategy 'strategy name' was smaller/equal 0. No target order placed"

                This is for November Soybeans and the profit target is $950. It is a day trade strategy and the code for the profit target is:
                SetProfitTarget(ProfitTargetAmt*Contracts);

                Here is the code

                protected override void OnBar Update()
                {
                if (BarsInProgress == 0) return;
                ***Long and Short Entry Code here*****
                SetProfitTarget(ProfitAmt*Contracts);
                SetStopLoss(StopLossAmt*Contracts);
                }

                What could be the problem?

                Comment


                  #9
                  Hello capstonetrader,

                  If you use the Print() function to print the ProfitTarget value you are using, do you receive the expected value? Or does it return as 0?

                  How are you declaring the ProfitAmt?
                  MatthewNinjaTrader Product Management

                  Comment


                    #10
                    It starts out as a private int for user input:

                    private int pProfitTargetAmt = 950;

                    then i do the following:

                    public int ProfitTargetAmt
                    {
                    get {return pProfitTargetAmt;}
                    set {pProfitTargetAmt = Math.Max(1,value);}
                    }

                    It works in Sim mode and backtesting but I haven't done the Print statement yet. If it works in Sim mode and backtesting, would the Print statement reveal something new?

                    Comment


                      #11
                      Hello,

                      It would be good to know what the value is when you're trading live. There shouldn't be a difference, however we shouldn't overlook this as that could explain the error you are receiving.

                      Is it on the targets you receive errors on? Does the entry order submit? Does the stop loss work as expected?
                      MatthewNinjaTrader Product Management

                      Comment


                        #12
                        The Sim account and historical backtesting work with entries and exits. The entries work as expected on the Live account but so far with only 2 live trades in this scenario on Interactive Broker account, the strategy exits as soon as it is open with the given error (show below) so we haven't had a chance to test stops or profit targets live.

                        The main problem is having to test with a live account and real money (since the Sim account works fine). Are there reasons a live account would differ from a simulated account?

                        What would the print statement look like for the profit target and stop loss?

                        Comment


                          #13
                          Hello,

                          The print statement should return with the value the target should be submitted to.

                          In order for me to help determine why this is occurring, I will need to review your log and trace files from the last date that this occurred.

                          Please send an email to support[at]ninjatrader[dot]com and include your most recent log and trace files, Attn: Matthew in the Subject line and a reference to this thread.

                          You will find the log file in the Documents > NinjaTrader 7 > Log folder.
                          • The log file will be named ‘log.20110930.txt’

                          You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.
                          • The trace file will be named ‘trace.20110930.txt’

                          Please attach both of these files to your next response. If these files are over 4MB, please let me know and I can respond with alternative instructions.
                          MatthewNinjaTrader Product Management

                          Comment


                            #14
                            Found this thread by google:

                            The error "Calculated target price for strategy ... was smaller/equal 0" may also be result of the following [red-eye programming]:
                            Open position using EnterLong and reversing it with EnterShortLimit(Quantity, signalName) instead of EnterShort(Quantity, signalName)

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by GussJ, 03-04-2020, 03:11 PM
                            11 responses
                            3,227 views
                            0 likes
                            Last Post xiinteractive  
                            Started by andrewtrades, Today, 04:57 PM
                            1 response
                            13 views
                            0 likes
                            Last Post NinjaTrader_Manfred  
                            Started by chbruno, Today, 04:10 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post chbruno
                            by chbruno
                             
                            Started by josh18955, 03-25-2023, 11:16 AM
                            6 responses
                            440 views
                            0 likes
                            Last Post Delerium  
                            Started by FAQtrader, Today, 03:35 PM
                            0 responses
                            12 views
                            0 likes
                            Last Post FAQtrader  
                            Working...
                            X