Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Activation Rule"

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

    "Activation Rule"

    Is there any way to develop a script that allows a trade to be placed after price passes a certain point? For instance lets say you were trading the NQ and your zone is from 2731.75 to 2732.75. I want to be able to set a trade so that when price passes a certain point (lets say 2732.00 for example) a short trade is placed at the beginning of my zone, 2731.75. That way if price drops out I will catch the trade, however if price just keeps going up through my zone the trade will never have been entered because price did not fall enough to activate my trade. Is there a way to do that?

    #2
    Hello maxwellstuart1,

    Thank you for your post and welcome to the NinjaTrader support forum.

    This would not be possible with an ATM Strategy unless you manually placed your entry order.

    However if you want to automate this you would use a NinjaScript Strategy.
    The condition for the Short Entry example you gave would look like the following:
    Code:
    if(Close[0] >= 2732.00)
    {
    EnterShortStop(2731.75);
    }
    If you have never created a strategy before, I would recommend starting with our point and click interface Strategy Wizard.
    Please see our Help Guide articles on How to use the Strategy Wizard as well as NinjaScript Strategies. More information on these subjects can be found below:
    Click here for more information on Developing Strategies with the Strategy Wizard
    Click here for a Tutorial on Developing Strategies

    I'm also proving a link to a recently recorded 'Automated Strategy Development Webinar' video for you to view at your own convenience: http://youtube/fVFqw5W8uGI

    There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

    We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples
    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    Lastly, you can attend one of our live Automated Strategy Development Webinars to help you get up to speed on developing strategies:
    http://www.ninjatrader.com/Webinar/A...nt-Level-1.php

    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
    Click here for a list of certified NinjaScript Consultants

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thanks, can I also specify my stop and target in the code? and once I place the order will I be able to manipulate my stop and target from chart trader or from the static superdom?

      Comment


        #4
        Hello maxwellstuart1,

        Thank you for your response.

        You can set the profit target with SetProfitTarget() and the stop loss with SetStopLoss(). For information on the Managed Approach Order Methods please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

        You can move your Stops and Targets from your Strategy on your order entry window but if you select CLOSE it will disable your Strategy.

        For information on running NinjaScript Strategies please visit the following link: http://www.ninjatrader.com/support/h...strategies.htm

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 12-01-2022, 05:43 AM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by llanqui, Today, 07:50 AM
        1 response
        4 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by Adam3123, 10-05-2020, 12:01 PM
        7 responses
        934 views
        0 likes
        Last Post Florencia  
        Started by julifro, 12-02-2022, 12:04 PM
        3 responses
        11 views
        0 likes
        Last Post abctrader  
        Started by morong0414, Yesterday, 01:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Working...
        X