Request for adding Support & Resistance to existing EA

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

Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Sun Dec 08, 2019 7:29 am

Please will you consider adding a third MA to this EA, in order to act as Longterm Support or Longterm Resistance for the MA Cross? Ideally the S&R MA can be a higher timeframe, or the same per selection.
viewtopic.php?f=38&t=64500&hilit=expert+advisor

Thank you.
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am


Re: Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Sun Dec 08, 2019 11:40 am

Let me try:

The S&R MA lines (MA3) are the first qualifying condition. Consider only Long trades when the the existing MA lines (MA1 and MA2) are above MA3. Consider only Short trades when MA1 and MA2 are below MA3.

If above Long or Short conditions are met, the rest of the decision logic may continue.

For every given set of settings, there will therefore only be longs or shorts. Multiple simultaneous Longs or Shorts are okay.

As my login name here says, I'm a crypto convert. This strategy worked okay for me in everyday altcoin trading - selling on average gain (Longs only, limited application):
- MA3 Support on daily or H4, over 200 SMA for example
- MA1 and MA2 multiple bullish crossovers on shorter TF, like M5. It sometimes helps if MA's are just 2 or so lengths apart, and/or non-lagging.

Hope this helps. Much appreciated.
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am

Re: Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Mon Dec 09, 2019 2:19 am

Seems my first reply yesterday didn't post. I think I clicked Save and not Submit!

There are 2 MA's in the existing code. An upcross of MA1(usually the faster one) over MA2 (usually the slower one) is a Long signal, a downcross is a Short. I propose to add a pre-conditions:
- A third MA of a selectable timeframe, to act as Support & Resistance
- For a long, the 2 original MA's have to be above the third MA, & the Close price as well
- For a short, the 2 original MA's have to be below the third MA, & the Close price as well
- Note that a variation could be that MA1 could be the slower one, and MA2 the faster one, which could help to get a slightly better entry point, depending on difference in MA's.

Longs and shorts signals then occur as per the original design, as long as the pre-conditions are met.

Potential variation/additional functionality:
- Introduce a fourth MA, so that there can be independent Long and a Short pre-conditions
- Have entirely independent MA logic for Long and Short - for example an upcross for a Long but also for a Short, MA1 for Longs is different that MA1 for Shorts, different timeframes, etc. This will be super, but a whole lot more than I asked for originally!

Safety:
- Please implement a maximum number of orders, as many crosses can happen (can't recall if it exists already)

I have used this successfully in crypto, accumulating position and selling at average gain. Not sure if it can work the same in Forex or CFD's, but I'm keen to try!

Thank you.
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am

Re: Request for adding Support & Resistance to existing EA

Postby Apprentice » Tue Dec 10, 2019 6:54 am

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

Re: Request for adding Support & Resistance to existing EA

Postby Apprentice » Wed Dec 11, 2019 5:23 pm

Try this version.
Two_MA_Cross_EA.mq4
(37.17 KiB) Downloaded 290 times

I didn't manage to get any trading with these updated rules.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Thu Dec 12, 2019 7:04 am

Thank you very much, Apprentice. This definitely works in Tradingview. I'm going to look for a way to get better data into Metatrader to test this. I will keep you updated.
Capture.PNG
Unoptomised but works
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am

Re: Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Thu Dec 12, 2019 12:13 pm

This is the type of result I hoped for, although the Control Points is misleading.
Capture1.PNG
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am

Re: Request for adding Support & Resistance to existing EA

Postby cryptoconvert » Thu Dec 12, 2019 5:49 pm

Apprentice, can you perhaps advise if this EA averages the breakeven point, profit taking point and stoploss point? If not, is it possible? And can they be separated from each other, so that a stoploss on trade 1 can activate but trade 2 and 3 can proceed to an average profit?
cryptoconvert
 
Posts: 13
Joined: Fri Dec 06, 2019 8:46 am

Re: Request for adding Support & Resistance to existing EA

Postby Apprentice » Tue Dec 17, 2019 12:01 pm

It was easier to recode this EA from scratch than to modify it. But some of the features were lost. I can add them later if you need some of them.
Two_MA_Cross_EA.mq4
(145.4 KiB) Downloaded 293 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 22 guests