Entry and Exit based on MACD Bull or Bear
Forums › ProRealTime English forum › ProOrder support › Entry and Exit based on MACD Bull or Bear
- This topic has 7 replies, 2 voices, and was last updated 8 years ago by siaoman.
-
-
07/06/2016 at 7:46 AM #10257
Hi,
I’m wondering if it’s possible to exit trades based on when the MACD Signal line goes into a DOWNTREND or UPTREND.
I’m looking to add this condition into my system to enter when MACD goes above zero (UPTREND) and then exit the next bar when the MACD Signal line shows a DOWNTREND. Vice versa for a SHORT trade.
Also, if possible, for a LONG trade to exit on the next bar when two DOWNTREND lines appear on the MACD Signal line.
I’ll attach a screenshot to give an idea of what I’m looking for.
Thanks!
07/11/2016 at 9:11 AM #10390Forgot to mention in the screenshot that the 2 MACD indicators are; 1) the standard MACD with values 8/16/6 and 2) ZeroLag MACD with values 8/16/6. Also, shoutout to Nicolas for creating this indicator for us.
@Nicolas, do you have an idea on how I can go about what I’m trying to achieve? If you need more info, let me know.Thanks!
07/11/2016 at 2:18 PM #1039707/12/2016 at 8:31 AM #10413Hey Nicolas,
Thanks for responding.
I’m currently not running it as an automated system until I can work out how to exit trades based on a decreasing/increasing value on MACD. That being said, I’m just trading the idea manually, however, below is a very basic system which would be the basis of where I’ll start creating my system from.
123456789101112131415161718192021222324252627282930313233343536// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1, ignored = CALL "ZeroLag MACD"[8, 16, 6]c1 = (indicator1 >= 0)IF c1 THENBUY 2 CONTRACT AT MARKETENDIF// Stops and targetsindicator2, ignored = CALL "ZeroLag MACD"[8, 16, 6]c2 = (indicator2 <= 0)IF c2 THENSELL 2 CONTRACT AT MARKETENDIF// Conditions to enter short positionsindicator3, ignored = CALL "ZeroLag MACD"[8, 16, 6]c3 = (indicator3 <= 0)IF c3 THENSELLSHORT 2 CONTRACT AT MARKETENDIF// Stops and targetsindicator4, ignored = CALL "ZeroLag MACD"[8, 16, 6]c4 = (indicator4 >= 0)IF c4 THENEXITSHORT 2 CONTRACT AT MARKETENDIFOther things that I’ll be adding to this system will be:
- Only place LONG or SHORT trades based on MA Crossover; SMA46 cross TMA94; LONG when SMA46 above TMA94, SHORT when SMA46 below TMA94. You can see this in my screenshot. BLUE = SMA46 / TEAL = TMA94 / RED = TMA19 (this is used for other reasons).
- Look into incorporating the awesome GRID system that Nicolas helped develop from cfta’s idea.
The time frame I used for the 2nd screenshot is 14:00 GMT+8 (AWST) to Real Time.
My biggest reason for exploring this request is to determine whether it is possible or not to close based on when MACD changes from incline to decline (and vice versa). Just some more knowledge to add to when thinking of new ideas for systems. Also, I’m starting to really like the ZeroLag MACD indicator that Nicolas created. It helps to reduce MACD fakeouts, which has led to me pursuing this idea on closing trades based on the ZeroLag MACD indicator.
If you need anything else, shoot me a message. I’m very active on the computer so can respond quite quickly.
Thanks!
07/15/2016 at 5:22 PM #1049207/15/2016 at 5:36 PM #10494Spot on Nicolas.
My objective is to test a simple strategy to close the trade when the MACD declines/inclines. Once I get a feel of how that plays out, I’ll look to add additional conditions, such as entering a trade based on SMA/TMA (like you specified in point 1).
07/16/2016 at 11:41 AM #1049807/20/2016 at 6:53 AM #10658 -
AuthorPosts
Find exclusive trading pro-tools on