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

Creating A Sell Order 20% below the Price of a Moving Average Crossover

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

    Creating A Sell Order 20% below the Price of a Moving Average Crossover

    Hi All

    I wanted to create a strategy that relies on such a sell order below. Any advice on how to do this in the strategy wizard? Thanks

    "Short sell 20% below the Price of a Moving Average Crossover"

    #2
    Hello AegisX,

    What you would want to do is build the condition when the SMA 50 crosses below SMA 200, trigger an action of saving the price of the SMA 50 to a variable. When you set the price of the variable, you would want to use an offset of .8 percent, which will multiple the 50 SMA by .8.

    Then you would set another set of conditions which would check if the current price was below 20% this figure, or .8 of this price, sell short. You could either do this by a limit order or by writing a condition which says if Close[0]<xVariable.

    I included a few screen shots to get you started.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi AlanP, Thanks for your quick replies on my posts. I will try it out on my own and will get back to you if I have any other questions.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      12 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      9 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by nandhumca, Today, 03:41 PM
      0 responses
      6 views
      0 likes
      Last Post nandhumca  
      Started by The_Sec, Today, 03:37 PM
      0 responses
      3 views
      0 likes
      Last Post The_Sec
      by The_Sec
       
      Started by GwFutures1988, Today, 02:48 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X