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


Auto Trailing Stop Strategy
Started: by sandptrader Views / Replies:6,291 / 18
Last Reply: 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,819 given, 463 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, 76 views)
Register to download File Type: cs FDAX1LBtrail.cs (10.7 KB, 78 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: 178 since Jun 2014
Thanks: 749 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: 41 since Aug 2011
Thanks: 31 given, 200 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
 
  #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

Futures Edge on FIO

Which products do you trade?

 
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 01: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: 64 since Apr 2010
Thanks: 33 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: 64 since Apr 2010
Thanks: 33 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 8th, 2016 at 12:30 AM. 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: Futures
 
Posts: 43 since Aug 2013
Thanks: 49 given, 3 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: 64 since Apr 2010
Thanks: 33 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

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)

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

Bookmap New Indicator Panel, Cumulative Delta, Order Flow demo

Jan 17
 

An Afternoon with FIO member Massive l

Elite only

Leo Murphy: Making sense of Technical Analysis and Random Walk

Elite only
 

FuturesTrader71: Ask Me Anything

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 08:07 PM
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 08:34 PM
Simple trailing stop strategy jeemba EasyLanguage Programming 2 August 2nd, 2013 08:05 AM
Exit at close for trailing stop strategy skorpyo ThinkOrSwim Programming 0 July 27th, 2013 05:56 AM
Strategy Disables When Trailing Stop Filled graygoat NinjaTrader Programming 2 September 27th, 2012 06:16 PM


All times are GMT -4. The time now is 07:16 AM.

no new posts
Page generated 2017-01-17 in 0.23 seconds with 38 queries on phoenix via your IP 54.205.111.118