Using Trailing Stop as a trigger to automatically open a trade?

Back to topics list To post a new topic, please log in or register
avatar
2
mdwebi 2016.06.06 23:22
 

I'm new in MQL4 and would like to know if anyone ever used the closure of a trade due to a "trailing stop" as a trigger to automate execution of trades :

For example, say you have an open SELL trade with a trailing stop. Then you want to automatically enter a BUY trade with a particular stop loss at the point the  SELL trade in question gets closed. If someone has done this please share the code.

avatar
1211
FMIC 2016.06.06 23:51 #
 

Yes! It is very common and it is called SAR - Stop and Reverse. It is also why the PSAR indicator is so called, Parabolic Stop And Reverse, and why it is a well known trailing stop method.

You will find several PSAR Expert Advisors published in the Code Base section that can serve as examples of code. Just use the "Search" function here on the site, with the "PSAR" keyword and restrict or filter by "Code Base".

avatar
2
mdwebi 2016.06.07 10:35 #
 
FMIC:

Yes! It is very common and it is called SAR - Stop and Reverse. It is also why the PSAR indicator is so called, Parabolic Stop And Reverse, and why it is a well known trailing stop method.

You will find several PSAR Expert Advisors published in the Code Base section that can serve as examples of code. Just use the "Search" function here on the site, with the "PSAR" keyword and restrict or filter by "Code Base".

Thanks FMIC, much appreciated.
Back to topics list  

To add comments, please log in or register