Stop Loss using very dynamic parabolic SAR
Forums › ProRealTime English forum › ProOrder support › Stop Loss using very dynamic parabolic SAR
- This topic has 6 replies, 3 voices, and was last updated 6 years ago by GraHal.
-
-
04/12/2018 at 12:49 PM #68155
Hi all,
i would like to share with you how I am using a stop loss with very good results.
What is new about using a SAR as a stop loss?
I use very low parameters, so at the beginning of the trade the levels are irrelevant but if the trade move significantly in my favour. It adapts its value to provide a very good resusts.
I hope is as useful for you that it is for me so far.
You need to define the initial stoplosslongn pips , initial stoplossshort in pips and the max pips to risk
it calculates the ratio of actual gains compare with the initial stop loss, if it is more than 1 the parameter of SAR starts to increase rapidly
123456789101112131415161718192021222324252627282930313233343536373839404142IF longonmarket THENKexit=max(1, ( (close-TRADEPRICE)/pipsize )/stoplosslong )Kexit= Kexit*KexitELSIF shortonmarket THENKexit=max(1, ( (TRADEPRICE-close)/pipsize)/ StopLossShort )Kexit= Kexit*KexitELSEKexit=1ENDIFmySAR=SAR[0.001*Kexit,0.001*Kexit,0.7]// ---> exit longIF longonmarket thenIF close crosses under MySAR and (close-TRADEPRICE)>0 THENSELL AT MARKETENDIFIF (close-TRADEPRICE) > 1*stoplosslong*pipsize THENStopPoints=(TRADEPRICE-mySAR)/pipsize+spreadStopPoints=max(0.5,StopPoints)SET STOP pLOSS min(StopPoints,maxrisk)ENDIFendif// ---> exit shortIF shortonmarket thenIF close crosses over MySAR and (TRADEPRICE-close)>0 THENEXITSHORT AT MARKETENDIFIF (TRADEPRICE-close) > 1*stoplossshort*pipsize THENStopPoints=(mySAR-TRADEPRICE)/pipsize+spreadStopPoints=max(0.5,StopPoints)SET STOP pLOSS min(StopPoints,maxrisk)ENDIFENDIF3 users thanked author for this post.
04/14/2018 at 10:04 AM #68339@Leo thank you for this, I want to try it, but I can’t see where to define …
initial stoplosslongn pips , initial stoplossshort in pips and the max pips
Do I need more coffee to wake me up?? 🙂
Thank You
GraHal
PS I can see now … I need to add a few lines … but you may as well make it newbie proof for the benefit of others?? 🙂 🙂Spread needs to be defined also.
I’ll let you know the results … improvement already and it’s only 3% through optimisation!!! 🙂 🙂
04/17/2018 at 6:34 AM #68551Hi,
nice that you like it, it is a comfort to help others. About the newbie prof is hard, because we need to explain many other things like spread:
What I use for define spread12345678Spread=0.7 // eurusd for IG//SPREAD APROXIMATIONIF TIME < 063000 THEN //(germany time)spread=1.7*spreadELSIF TIME>213000 THEN //(germany time)spread=1.7*spreadENDIFStoplosslong initial is your style of trading, some use Dochian channel some other a fix value of pips, others the porcentage.
I define max risk because a very bad experience (once I try ATR as stopploss and it traded just after macroeconomics data release, which make me lost a lot! ) so whatever your stopploss is, do not exceed Maxrisk value.
so, and the end coffee works?
What about your trading with this stop loss system?
04/17/2018 at 2:21 PM #6858304/17/2018 at 2:38 PM #6858404/17/2018 at 2:53 PM #68596Oh well I am so glad my lost post was not a long one! So here it is again …
I saved your snippet to my database Leo … Row 18.
https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit?usp=sharing
Anybody can add / edit etc so feel free … the link is open to ALL. to add and benefit from the snippets.
04/17/2018 at 3:16 PM #68604 -
AuthorPosts
Find exclusive trading pro-tools on