Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change TS strategy to submit buy to NT

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

    Change TS strategy to submit buy to NT

    Hello, I want to change a TS strategy to submit the buy signal to NT. I successfully input the NINJATRADER.ELD and the NTEXTERNALFEED into the chart.

    My issue is that TS does not accept the buy order (If Close < xaverage(close,EMAlength) and (RSI_Cond_3) then NTbuyMarket (1,1) ("NT Below 200 DAY EMA") this bar at close

    I get the error message: "Assigment to a function is not allowed" (Note that I tried several ways but nothing worked).

    I use NT 6.5 and TS 8.8.

    Can you help me ? Did I miss something?

    Many thanks in advance
    Mirko

    #2
    Hello,

    Did you review the limits for the TS connection at the top of this link?:


    Are you trying to do any of that?
    DenNinjaTrader Customer Service

    Comment


      #3
      I only want to insert the ELD in tradestation to send the trading signal to ninjatrader to be able to use a ninjatrader broker. Please have my question reviewed by an expert who knows what you have to insert into the TS strategy. You can find it in your files under "TradeStation Functions" or "data retrieval functions"

      Comment


        #4
        Hi Mirko, please give this snippet below a go - your TS code had unfortunately errors preventing a successfull verify of it -

        If Close < xAverage(Close, 200) and (RSI_Cond_3) then value1 = NTBuyMarket(NTNewOrderId, 1);
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks a lot. It works and I get a return value of 0 which means "success".
          I run the string at the close of every minute bar. In NT the "connected external" and "ATI" signs at the bottom are green and the external data is received but I do not see the orders.

          What do I have to do in addition to forward or see the orders?

          Comment


            #6
            You're welcome - are there any errors in your log tab? Which symbol are you working on in TS and which are you using in NT?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              No errors on the log tab. I use APPL (Stock) as symbol and can see the that the apple stock data is transfered from TS. The execution of 6 AAPL was a manual test from me. In the strategy I put 35 shares of AAPL in but can find nowhere.



              Comment


                #8
                Mirko, it looks like you were not connected to the External Feed connection as you tested your TS strategy (that's why the later manual orders after the connection was running worked out). Please try this approach -

                1. Open NT, Connect to External and enabled ATI

                2. Open TS, open your chart, add NTExternalFeed strategy and ensure NT is receiving the market data need to drive the simuator properly.

                3. Check your default account is set to the Sim101 one, under Tools > Options > ATI

                4. Use for example this snippet below to test, it would ensure to send orders only as there's a successfull connection to NT, a flat NT marketposition and if it's the last bar on the chart in TS (avoiding duplicate orders) -

                if LastBarOnChart and NTConnected(1) then begin
                if NTMarketPosition("") = 0 then begin
                If Close < xAverage(Close, 200) then value1 = NTBuyMarket(NTNewOrderId, 1);
                end;
                end;

                Following the above steps worked on my testing here.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Bertrand,
                  Thanks it is working now and I receive orders from TS in NT.

                  I have an issue with the licence keys, one is from IAB (only for SIM trading with API function) and the other is from ZenFire (without API function).

                  What do I have to do to get the orders forwared to a broker? Are there any brokers supply a key to get an external data feed + ATI to which I can send my orders?

                  Comment


                    #10
                    Great to hear Mirko, those features are unfortunately not supported on the direct edition licenses - to work with the ATI executing on a live account you would need to use a standard edition license from us -

                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Segwin, 05-07-2018, 02:15 PM
                    14 responses
                    1,789 views
                    0 likes
                    Last Post aligator  
                    Started by Jimmyk, 01-26-2018, 05:19 AM
                    6 responses
                    837 views
                    0 likes
                    Last Post emuns
                    by emuns
                     
                    Started by jxs_xrj, 01-12-2020, 09:49 AM
                    6 responses
                    3,293 views
                    1 like
                    Last Post jgualdronc  
                    Started by Touch-Ups, Today, 10:36 AM
                    0 responses
                    13 views
                    0 likes
                    Last Post Touch-Ups  
                    Started by geddyisodin, 04-25-2024, 05:20 AM
                    11 responses
                    63 views
                    0 likes
                    Last Post halgo_boulder  
                    Working...
                    X