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 janefoster, Yesterday, 11:50 PM
        0 responses
        5 views
        0 likes
        Last Post janefoster  
        Started by kaywai, 07-13-2024, 09:05 PM
        3 responses
        27 views
        0 likes
        Last Post kaywai
        by kaywai
         
        Started by stafe, Yesterday, 01:32 PM
        2 responses
        19 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by Jakub, Yesterday, 11:06 AM
        2 responses
        24 views
        0 likes
        Last Post ashpang
        by ashpang
         
        Started by MatthewLesko, 05-21-2021, 09:37 PM
        4 responses
        167 views
        0 likes
        Last Post Mahmad1323  
        Working...
        X