Two Time Frame MA Crossover Strategy

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Two Time Frame MA Crossover Strategy

Postby Sheera123 » Wed Oct 28, 2020 7:42 am

Hello Apprentice,

I have an idea for a strategy that trades two MA crossover on a lower TF with respect to the open/close status of the CURRENT candle on a higher TF. The logic is as follows:

Long Position:
- On Higher TF - CURRENT candle's CLOSE is higher than it's OPEN.
- On Lower TF - fast MA crosses ABOVE slow MA

Exit Long Position:
- On Higher TF - CURRENT candle's CLOSE is higher than it's OPEN.
- On Lower TF - fast MA crosses BELOW slow MA

Short position:
- Opposite of Long Position.

Exit Short Position:
- Opposite of Exit Long Position

In the list of MA's the user has to chose from can you include the "McGinley Dynamic" indicator.

Thanks,

Shawn
Sheera123
 
Posts: 58
Joined: Tue Jun 05, 2018 1:08 pm

Re: Two Time Frame MA Crossover Strategy

Postby Apprentice » Thu Oct 29, 2020 11:43 am

Your request is added to the development list.
Development reference 2238.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Time Frame MA Crossover Strategy

Postby Apprentice » Fri Oct 30, 2020 12:44 pm

Try this version.
viewtopic.php?f=31&t=70586&p=138577#p138577

Can you please review my coding,
and especially the exit rules?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Time Frame MA Crossover Strategy

Postby Sheera123 » Sun Nov 01, 2020 8:04 am

Hi Apprentice,

Thanks for coding the strategy. I tried it in simulation mode and it opens, closes and exits trades, but at the wrong time. It doesn't seem to be following the logic or the timing of the logic. To reiterate my logic, just in case I wasn't I clear, I've added a graphical representation of how LONG positions are to be opened and closed. The opposite would be true for SHORT positions.

The general idea behind the strategy is to open only Long positions when the current price is greater than the current open on the higher TF. The lower TF is used as a filter, when a long position no longer exists on the lower TF, close the long position and wait for the next condition. The opposite is true for short positions.

This is meant to trade the higher time frames like H4 and D1 and at the same time avoiding most of the draw downs. The user will have to experiment with which two TF's works best for them. My personal intention is to use it on the H4, D1, m1, m5 combinations.

Thanks again and hope this helps with debugging.
Attachments
Untitled.png
Sheera123
 
Posts: 58
Joined: Tue Jun 05, 2018 1:08 pm

Re: Two Time Frame MA Crossover Strategy

Postby Apprentice » Sun Nov 01, 2020 8:42 am

Your request is added to the development list.
Development reference 2241.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Time Frame MA Crossover Strategy

Postby Apprentice » Mon Nov 02, 2020 3:04 am

I've reviewed the code.
It looks like everything is fine. It works as requested.
But keep in mind that you can't verify it just by looking on the chart.
I wrote an article about it here: https://www.patreon.com/posts/danger-of-mtf-31103413
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two Time Frame MA Crossover Strategy

Postby Sheera123 » Tue Nov 03, 2020 7:31 pm

Thanks for the explanation, it makes a lot of sense.
Sheera123
 
Posts: 58
Joined: Tue Jun 05, 2018 1:08 pm


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 19 guests