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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        88 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        30 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        68 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X