Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple crossover strategy

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

    Simple crossover strategy

    Hi; I hired one of the 3rd party developers listed on the NT site to write a simple EMA crossover strategy; when the fast EMA crosses above the slow EMA, it goes long, when it crosses below, it goes short. The problem is the strategy shuts down when there is more than one trade during the day. It is a EOD system. Can I have you look at it for errors? I do not want to post it on this site. I am executing through TDAmeritrade.

    #2
    bppayne,

    I am not sure what you mean by shutting down when there is more than one trade. Can you please elaborate?

    I would recommend you try going back to the consultant that did the work for you and see if they can address the issue since it was their code.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Usually this strategy trades once during the day; occasionally it will trade 2 or 3 times; ie, if it goes long at 10, then goes short at 12, it should close out the long and enter a trade in the other direction. Thats where the problem is; I get error messages and the strategy terminates. The long position is closed, but the short does not get entered.
      Error messages:
      [IMG]file:///C:/DOCUME%7E1/Bruce/LOCALS%7E1/Temp/moz-screenshot.png[/IMG][IMG]file:///C:/DOCUME%7E1/Bruce/LOCALS%7E1/Temp/moz-screenshot-1.png[/IMG][IMG]file:///C:/DOCUME%7E1/Bruce/LOCALS%7E1/Temp/moz-screenshot-2.png[/IMG][IMG]file:///C:/DOCUME%7E1/Bruce/LOCALS%7E1/Temp/moz-screenshot-3.png[/IMG]Your order(s) can't be placed. The total quantity of outstanding open sell order(s) exceeds the quantity you hold. Affected Order: Sell 100 Market
      Strategy 'bpEMA' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests

      I have gone back to the consultant, he's re-written it 3 times total; same problems.

      Comment


        #4
        Let him know that for the TDA adapter, he needs to explicitly exit the long position, wait for confirmation, and then explicitly enter a short position via ExitLong and EnterShort.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by warreng86, 11-10-2020, 02:04 PM
        4 responses
        1,354 views
        0 likes
        Last Post mathewlo  
        Started by Perr0Grande, Today, 08:16 PM
        0 responses
        2 views
        0 likes
        Last Post Perr0Grande  
        Started by elderan, Today, 08:03 PM
        0 responses
        5 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        12 views
        0 likes
        Last Post maybeimnotrader  
        Working...
        X