Idea for trailing stop
  #1 (permalink)  
Old 12-01-2006, 10:48 PM
Freshman
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
grantfx is on a distinguished road
Red face Idea for trailing stop

Can someone code a trailing stop indicator in the style of the parabolic SAR.
Modifying the existing code of the parabolic may be a shortcut to getting the idea working.

So, if the condition is "long", then we want the stop moved to the midpoint of the lows of the two previous bars.
the psuedo code::: val = (low(-1) - low(-2))/2 + low(-2);

and if, the condition is "short", then we want the stop moved to the midpoint of the highs of the two previous bars.
the psuedo code::: val = (high(-2) - high(-1))/2 + high(-1);

It should act like the current parabolic where the long/short dots are drawn as the stop is hit. SAR.

Happy coding
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trailing stop methods TraderSeven Trading Systems 6 11-09-2007 03:32 PM
Changing Trailing Stop tradetrade System Coding 1 08-07-2007 11:57 AM
breakeven/trailing stop MuppetMan MetaTrader and ZeroCode 2 09-23-2006 08:22 AM
HELP! trailing stop for medium price giraia_br MetaTrader and ZeroCode 4 06-14-2006 06:45 AM
TRading Idea adam MetaTrader and ZeroCode 4 06-22-2005 08:12 AM


All times are GMT. The time now is 01:02 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast