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

Need Help With Strategy Builder

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

    Need Help With Strategy Builder

    Trying to figure out what is not working with this. I want it to buy when the high touches the upper band of the channel. If it is in a position I then want it to sell that position when it touches the lower band. Right now with these settings nothing is happening.
    Attached Files

    #2
    Hello cbratton,

    Thanks for your post.

    If you are applying your strategy to a chart, you do not need to add the data series in the "additional data" window of the strategy builder. Unless you have a specific need for this I would advise removing the added data series.

    In the conditions window, you have two conditions and have selected "If any" condition is true then the actions section will be implemented. The actions are to enter and exit a position which would leave you with no position. A recommendation would be to set one order action per set. So set one would have the entry conditions and the entry order and set two would have the exit conditions and the exit order.

    The conditions of cross above and cross below both point to the "lower" plot of the Donchian Channel. When you set the conditions, you will want to select the "Upper" for the "value plot" selection for the cross above. The "value plot" is the plot used for the condition and in the case of multiplot indicators you must select the plot for the condition to use.

    It is a good practice to verify that you are in a position before using an Exit method. It is also a good practice to verify you are flat before entering a position. As part of the conditions for the set that has the ExitLong() method you can add a check to see if your market position is long. As part of your conditions for entering you can check that you are flat. Please see the helpguide section of the strategy builder titled, "How to create market position comparisons" here: http://ninjatrader.com/support/helpG...on_builder.htm

    When creating a strategy it can be helpful, for debugging purposes, to add a visual indication on the chart when a condition set is true. In the actions section you might consider adding the action to draw a marker such as a dot or a triangle above or below the bar. This marker then would show you on the chart exactly where your conditions are true and can help in understanding how your strategy logic is working. This often helps to remove the mystery of the strategy. You can always remove the dots/markers once you have the strategy working as expected. Here is a short video on some considerations needed to show markers for all conditions as well as relating them to price: https://www.screencast.com/t/Ijoqo7nde5vn
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Jon17, Today, 04:33 PM
    0 responses
    1 view
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    6 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    41 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X