Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

EMA CROSS buy or sell on Average problem

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

    EMA CROSS buy or sell on Average problem

    Hi Everyone
    i have two ema cross on a strategy. When they cross above or below the average i want to submit a limit order to be working on the faster moving average. but when the order goes in it just dissapears. I want it to be following the ema price up or down till filled. is this as simple as a setting or something that has to be wrote in a code. I used the wizard to build the basics.
    any help would be great thanks

    #2
    Hello bsspga,

    Thank you for your post.

    What are you using for your orders? Market, limit or stops?

    What are you using to calculate your the cross of the moving average?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      im using a a fast and slow ema average. I can get the strategy to work with market orders no problem when the averages cross above or below. i want it when the averages cross above work a limit order on the fast moving average instead of going to the market. it flashes the order then is gone i have calculate on bar close false so it continuously works i assume till filled but then im thinking it has nothing to do with the last bar has to do with the price of the ema till filled

      Comment


        #4
        bsspga,

        Can you please attach your script so that I can investigate it?

        Your script is located in (My) Documents -> NinjaTrader 7 -> bin -> Custom -> Strategy
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          i have uploaded please have a look thank you for your help on this i appreciate it
          Attached Files

          Comment


            #6
            Hello bsspga,

            Thanks for your reply.

            What is happening is at each new bar update NinjaTrader is checking the condition from your strategy. If your limit order was not filled on the previous bar it is getting canceled out on the new bar because the crossover condition is no longer true (since it occurred on the previous bar).
            You could use great than and less than conditions however you would then also need to create exit conditions for your strategy.
            BrandonNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by nuobo, Yesterday, 07:43 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by Lcorreia82, Yesterday, 12:37 AM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by MrForgetful, Today, 01:28 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by ETFVoyageur, Yesterday, 02:04 PM
            4 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by hdge4u, 04-29-2024, 12:23 PM
            2 responses
            13 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Working...
            X