Auto Trailing Stop Strategy - NinjaTrader | futures io social trading
futures io futures trading


Auto Trailing Stop Strategy
Updated: Views / Replies:6,870 / 19
Created: by sandptrader Attachments:7

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 7  
 
Thread Tools Search this Thread
 

Auto Trailing Stop Strategy

  #11 (permalink)
Elite Member
Valdosta, GA. U.S.A
 
Futures Experience: Advanced
Platform: Sierra ,NT, TOS
Favorite Futures: 6E, 6J, CL, GC
 
Posts: 479 since Sep 2010
Thanks: 1,821 given, 464 received

Another Trailing Stop Shell

Here is another Trailing Stop Shell/Program
If anyone wants to work with this and try and see if it works reliably for Auto Trailing.
My Goal is to use any Program that would be Reliable for Auto Trailing your Stop, Preferably Parabolic Sar.
I have not found that Program yet, but wanted to post what i can find here at futures.io (formerly BMT) to see if i can get some help and maybe by way of a few folks Testing these Programs we could have a Decent Auto Trailing Stop for our Trading.
I have seen where i could have made so much more if i had this type program.
Anyone who wants to try these for Testing on Demo first and then make comments on their Reliability are welcome to Post.
Like i said before i am not a programmer, or do i know much at all about code, so i am asking for help.
One of these Programs may be what i am looking for to Trade GC & CL with an Auto Trailing Stop.
just now started to try an implement these into the platform, so i am a bit lost with using them.
Link to thread where i found this one, Post # 10.....www.bigmiketrading.com/ninjatrader-programming/3799-possible-trail-stop-per-parabolic-sar.html
Thanks for your help.

Attached Files
Register to download File Type: zip FDAX1LBtrail.zip (3.2 KB, 81 views)
Register to download File Type: cs FDAX1LBtrail.cs (10.7 KB, 84 views)
Reply With Quote
 
  #12 (permalink)
Trading Apprentice
Bogota, Cundinamarca, Colombia
 
Futures Experience: Advanced
Platform: NJ,TS,Sierra,MT4
Favorite Futures: Futures
 
Posts: 1 since Jul 2014
Thanks: 0 given, 0 received

Hi,

I have programmed a trailing SAR stop for my strategy; i can modify it to suit your needs. Let me know if this still interests you.

Reply With Quote
 
  #13 (permalink)
Elite Member
ITAJAI SC/BRAZIL
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Clear Corretora
Favorite Futures: DOLFUT, WINFUT
 
Posts: 181 since Jun 2014
Thanks: 755 given, 130 received


Hi @privacy8,

If you could share your trailing solution I think it would be useful for others.
@pepbosch is a user i know is looking for this kind of solution. He asked for this a few days ago on other thread (want your strategy created free)

Thank you and best regards,

Reply With Quote
The following user says Thank You to MrTrader for this post:
 
  #14 (permalink)
Elite Member
NY NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp/CQG
Favorite Futures: Futures - CL/GC/YM
 
Posts: 42 since Aug 2011
Thanks: 31 given, 204 received

SAR Trail

I built a PSAR trail into this: https://futures.io/elite-circle/33613-charttrader-add-enhancement-elite-members-linked-non-elite-journal.html#post443975 might help?

Reply With Quote
The following user says Thank You to traderlange for this post:
 
  #15 (permalink)
Trading Apprentice
Freiburg, Germany
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: YM
 
Posts: 1 since Apr 2012
Thanks: 1 given, 1 received

Trailing Stop with SAR

You can add this to your strategy with the edit strategy wizard:

For Exit Long:
CrossAbove(SMA(ParabolicSAR(0.02, 0.2, 0.02),1),SMA(1),1)
This means, a 1 period SMA of the ParabolicSAR crosses above a standard 1 period SMA.

In the view code it looks like this:
// Condition set 2
if (CrossAbove(SMA(ParabolicSAR(0.02, 0.2, 0.02), 1), SMA(1), 1))
{
ExitLong("LoEx", "Lo");

Reverse for Short Exits:
// Condition set 4
if (CrossBelow(SMA(ParabolicSAR(0.02, 0.2, 0.02), 1), SMA(1), 1))
{
ExitShort("ShEx", "Sh");

This is my solution for the Trailing Stop with ParabolicSAR.


Last edited by Hansen; May 21st, 2016 at 12:15 PM. Reason: Improvement
Reply With Quote
The following user says Thank You to Hansen for this post:
 
  #16 (permalink)
Elite Member
Calgary AB, Canada
 
Futures Experience: Master
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: CL, GC, ZB
 
master trader's Avatar
 
Posts: 66 since Apr 2010
Thanks: 34 given, 14 received

Need similar solution using SuperTrend trailing Stop


Hansen View Post
You can add this to your strategy with the edit strategy wizard:

For Exit Long:
CrossAbove(SMA(ParabolicSAR(0.02, 0.2, 0.02),1),SMA(1),1)
This means, a 1 period SMA of the ParabolicSAR crosses above a standard 1 period SMA.

In the view code it looks like this:
// Condition set 2
if (CrossAbove(SMA(ParabolicSAR(0.02, 0.2, 0.02), 1), SMA(1), 1))
{
ExitLong("LoEx", "Lo");

Reverse for Short Exits:
// Condition set 4
if (CrossBelow(SMA(ParabolicSAR(0.02, 0.2, 0.02), 1), SMA(1), 1))
{
ExitShort("ShEx", "Sh");

This is my solution for the Trailing Stop with ParabolicSAR.


Many thanks.
Can you or anyone reading this do a similar solution using SuperTrend Trailing Stop instead of parabolic SAR. Will be much appreciated.

Reply With Quote
 
  #17 (permalink)
Elite Member
Calgary AB, Canada
 
Futures Experience: Master
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: CL, GC, ZB
 
master trader's Avatar
 
Posts: 66 since Apr 2010
Thanks: 34 given, 14 received


master trader View Post
Many thanks.
Can you or anyone reading this do a similar solution using SuperTrend Trailing Stop instead of parabolic SAR. Will be much appreciated.


@Hansen:

Don't worry about that. Turns out the plots are exposed in anaSuperTrend so I was able to do that myself. For anyone who may need the code here's how to add anaSuperTrend trailing stop to a Strategy.

//For Longs:

if (Position.MarketPosition == MarketPosition.Long && (anaSuperTrendU11(2, 1.5, 18, false, anaSuperTrendU11BaseType.Median, anaSuperTrendU11OffsetType.Default, anaSuperTrendU11VolaType.Simple_Range).StopDot[0] >= Close[0]))

{
ExitLong();
}


//For Shorts:

if (Position.MarketPosition == MarketPosition.Short && (anaSuperTrendU11(2, 1.5, 18, false, anaSuperTrendU11BaseType.Median, anaSuperTrendU11OffsetType.Default, anaSuperTrendU11VolaType.Simple_Range).StopDot[0] <= Close[0]))

{
ExitShort();
}



Don't forget to add the anaSuperTrend indicator to the chart.


Hope that helps.


Last edited by master trader; August 7th, 2016 at 11:30 PM. Reason: added comments
Reply With Quote
The following user says Thank You to master trader for this post:
 
  #18 (permalink)
Elite Member
Dallas, TX/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, CL
 
Posts: 44 since Aug 2013
Thanks: 51 given, 4 received


master trader View Post
@Hansen:

Don't worry about that. Turns out the plots are exposed in anaSuperTrend so I was able to do that myself. For anyone who may need the code here's how to add anaSuperTrend trailing stop to a Strategy.

//For Longs:

if (Position.MarketPosition == MarketPosition.Long && (anaSuperTrendU11(2, 1.5, 18, false, anaSuperTrendU11BaseType.Median, anaSuperTrendU11OffsetType.Default, anaSuperTrendU11VolaType.Simple_Range).StopDot[0] >= Close[0]))

{
ExitLong();
}


//For Shorts:

if (Position.MarketPosition == MarketPosition.Short && (anaSuperTrendU11(2, 1.5, 18, false, anaSuperTrendU11BaseType.Median, anaSuperTrendU11OffsetType.Default, anaSuperTrendU11VolaType.Simple_Range).StopDot[0] <= Close[0]))

{
ExitShort();
}



Don't forget to add the anaSuperTrend indicator to the chart.


Hope that helps.

Thanks much. Will this create a server side stop (like trailing) or exit when the stop line breaks?

Thanks in advance.

Difference between discomfort and pain = 1 tick
Reply With Quote
 
  #19 (permalink)
Elite Member
Calgary AB, Canada
 
Futures Experience: Master
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: CL, GC, ZB
 
master trader's Avatar
 
Posts: 66 since Apr 2010
Thanks: 34 given, 14 received


KrazyTrader View Post
Thanks much. Will this create a server side stop (like trailing) or exit when the stop line breaks?

Thanks in advance.


I believe it works like OCO, it resides in your PC.

Reply With Quote
 
  #20 (permalink)
Elite Member
Ath. Gr.
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, 6E
 
Posts: 29 since Nov 2016
Thanks: 20 given, 11 received



sandptrader View Post
The Chart shows the Trade and Parabolic Sar for Trailing.
Things to Consider would be as Follows:

- Platform Disconnects....what happens to the Trailing Stop or would there be any Stop Protection?
- would the Parabolic Sar Trailing Stop be Unwantedly Executed by way of either Bid/Ask quotes and not True
Executed Prices?
- Any other suggestions would be appreciated as this is ongoing project for me until i get this Strategy completed.

Hello sandptrader,

Interesting chart. I am mostly interested about the "line-type" oscillator (on the bottom of the chart). Is it possible for me to have it (download it or buy it) ? Or can you please tell me where can I find it ? I have developed similar (private) indicators of my own, but I would like to see yours as well. Thank you.

Reply With Quote

Reply



futures io > > > > Auto Trailing Stop Strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May

An overview of volumetric analytical tools w/Sergey Sokolov @ PTMC

Elite only

John Hoagland (TBA)

Elite only

FuturesTrader71 Extended Ask Me Anything (AMA)

Elite only

Pete @ Jigsaw Trading (TBA)

Elite only

John @ No BS Day Trading (TBA)

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using SuperTrend for trailing stop in a strategy - help needed DarrenH NinjaTrader Programming 13 June 25th, 2014 07:07 PM
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 07:34 PM
Simple trailing stop strategy jeemba EasyLanguage Programming 2 August 2nd, 2013 07:05 AM
Exit at close for trailing stop strategy skorpyo ThinkOrSwim Programming 0 July 27th, 2013 04:56 AM
Strategy Disables When Trailing Stop Filled graygoat NinjaTrader Programming 2 September 27th, 2012 05:16 PM


All times are GMT -4. The time now is 06:38 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-05-28 in 0.15 seconds with 40 queries on phoenix via your IP 54.162.168.187