Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Based Stop-loss Strategy

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

  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    Not that I am aware of, the link in your post# 16 are the best examples.

    Leave a comment:


  • jak479
    replied
    Thanks. That was easy enough. There are some other examples I would like to look at but can't seem to get the strategy builder to recognize. Are there any similar examples I could study as an alternative to them?

    https://ninjatrader.com/support/foru...s-cs-expecting

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    I would suggest removing the extracted files.

    The proper way to import a zipped file is to use Tools>Import>Ninjascript add-on.. and in the selection window only zip files will show.

    Leave a comment:


  • jak479
    replied
    Thanks. With some trial and error I was able to more or less get it working. It broke the trade into several smaller legs but I'm okay with that. I'm wondering about some of the logic I'm using. So I checked the forum for some examples to study but I can't seem to load them up. I've extracted the zip files to the location where my other strategies are but they aren't being recognized inside the strategy builder. Not sure what I am doing wrong.

    Located at

    https://ninjatrader.com/support/foru...rategy-builder

    Attached Files

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    You could compare the current bar value of the lower band to the previous bar value of the lower band and see if it is less indicating perhaps a reversal. This may be too reactive as only two bars are considered.

    You could use the Misc>Slope and use the std error bands (pick one of the 3 plots) as the input series. A negative value of slope would indicate falling. The slope allow you o specify how many bars to use for the slope calculation. So you can use Misc>Slope> indicators>std error (pick a plot), less, Misc>numeric value> 0

    Leave a comment:


  • jak479
    replied
    The screenshot reflects historical data. The strategy calculates on each tick. Sorry for the confusion. I meant to state the gold regression line not the 4:01 exit bar. So ideally I would like to make it so an exit order gets submitted when the channel turns south which is at approximately 3:40.

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    Is the screenshot of a live trade or a trade made on historical data?

    What is the Calculate setting of the strategy? (Calculate.OnBarClose, Calculate.OnPriceChange, or Calculate.OnEachTick)

    "What I would like to do is have an exit order placed when the gold St. Err bar starts to reverse its direction." In your screenshot I don't see a gold bar. Are you referring to the 4:00 bar or the longer 4:01 bar?

    Can you provide a screenshot of your exit condition?

    Leave a comment:


  • jak479
    replied
    In this trade, there are about 10 ticks of value that got left on the table. I am having trouble configuring the exit to correct this. What I would like to do is have an exit order placed when the gold St. Err bar starts to reverse its direction. I can't quite figure out how to place it in condition builder. Appreciate your help.
    Attached Files

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    Yes, using draw markers can be very helpful when debugging. It is common to use them to indicator when a "set" is true. By using different colors (or different objects) and placing them at different y location offsets you can see bar by bar what set it true and when.

    Glad you found the video helpful!

    Leave a comment:


  • jak479
    replied
    Very helpful video. Resulting dots are very helpful in figuring out what is going on. Thanks!


    Click image for larger version

Name:	NQ 03-21 (1 Minute) 2020_12_18 (12_04_27 AM).png
Views:	134
Size:	40.1 KB
ID:	1133173

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    Yes, however, to see a marker at every instance you would have to provide a unique tag name for the object. If the same tag name is used the previously drawn object is automatically removed to make way for the new object. This is the default behavior in the Strategy Builder( using the same tag names), so you would only see the latest occurrence.

    The other requirement is the Y location, (Price location), to display the object. Typically you would want to relate this to a price on the chart such as above or below the bar so that it is visible. By default, this value would be 0 so you may be drawing them but at a price of 0 unless you have put in a price reference

    I've attached a short video on how to be able to see all of the markers and well as how to adjust them to place on the chart: https://paul-ninjatrader.tinytake.co...MF8xMTMwNTc0MA

    Leave a comment:


  • jak479
    replied
    Will the drawing show up on backtesting? I only see entries and exits, no indicators on the chart.

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jak479,

    Thanks for your reply.

    In another set you can check the market position and if long (or short) you can draw a marker, such as a dot/square/triangle at the Yvalue of Position.AveragePrice plus (or minus) the ATR value.



    Leave a comment:


  • jak479
    replied
    I suspect I need to debug my stoploss order entry. What I would like to do is mark up the chart to show where the system has placed its stop orders. Is there a way to do this?

    Leave a comment:


  • jak479
    replied
    Got it working! Thanks for the help!

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Pete77, Today, 10:22 AM
0 responses
2 views
0 likes
Last Post Pete77
by Pete77
 
Started by dtl-saw, Today, 08:51 AM
0 responses
2 views
0 likes
Last Post dtl-saw
by dtl-saw
 
Started by Lindsay10, Today, 08:22 AM
1 response
5 views
0 likes
Last Post NinjaTrader_Jason  
Started by Carlito178, Today, 06:49 AM
3 responses
13 views
0 likes
Last Post NinjaTrader_Jason  
Started by space_trader, Today, 04:20 AM
0 responses
11 views
0 likes
Last Post space_trader  
Working...
X