MACD-Rush EA

biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

MACD-Rush EA

Post by biobier »

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • This robot will have BUGs as not all functions might be tested completely.
  • Trade this robot first in Demo account for a long period (at least 100 trades).
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
    • How to use EA's.
    • MACD
    • Moving averages
    • How to watch youtube
MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about. This sort of Black Swan event can happen at any second.
--------------------------------------------------------------------
Mostly for educational purpose I have started on a fork of Steve's Moving Day EA. It is a try of an EA to comply with the strategy of the Trading Rush MACD videos on YT (therefore the name) https://www.youtube.com/watch?v=6DE_eEMfOP8
https://www.youtube.com/watch?v=nmffSjdZbWQ
https://www.youtube.com/watch?v=RzGIdibpo8Q
Beeing aware MACD is available as a trigger in "Trendy Monster Moving Day" I felt it does miss a lot of details (and I needed a goal as coding exercise :smile: ). The feault settings are according to the rules described there (assuming a buy scenario, put it upside down for Sell):
  • when MACD crosses above signal line and the MACD crossover is below the zero line and market is above 200 Moving Average
  • only take buy signals that are way below the zero line of the histogram
  • MACD is showing a crossover below zero line of the histogram
  • stop loss is below the pullback of the trend (a.k.a. Support/Resistance)
  • profit target should be more than the risk (SL)
  • take 25 percent off the trade when the trade reaches 1 times the risk (initial SL) and will move the stop loss to break even
  • final profit target of 2 times the risk (initial SL)
In the heart it is Moving day with MACD as a trade trigger and a lot of tuning, enhancements and additional trade confirmations. The new inputs (that differ from Moving Day):
  • Logging= Logging with different levels (use trace level to really understand why the EA has done what)
  • AlertOnOrderSend= Gives an alert when an order was placed (Useful for semi-automated trading)
  • CloseOnOpposideCross= Close on MACD cross back
  • CloseOnOpposideCrossPendingsOnly= Close only pending’s on MACD cross back
  • IgnoreOpeningCandle= Ignore MACD cross back if it is the candle when the order was opened
  • exitOnEveryTick= Check MACD cross back every tick
  • UseMaForConfirmation= Use a moving average as a confirmation. Price above MA --> up trend
  • MacdMaDirectionChkCandles= Check if the MA is following the trend for the x amount of candles. (0 to disable)
  • MacdMaOpposedTrend= MA As counter trend (useful for retrace trading)
  • MacdMaDistancePips= Required distance from the close price to the MA (0 to disable)
  • UserMaDistanceForTP= Use the above as TP (just a short cut of setting TakeProfitPips to the same)
  • FactorAwayFromMacdZero= The required distance in pips for the MACD Main line to 0 (0 to disable)
  • histogramPipSizeAfterCross= Size of the MACD histogram when crossing (0 to disable)
  • IgnoreMacdSideofCross= Ignore the side (above or below 0) of cross
  • BarRangePrevCndls=2 Check that we did not had big bars already by Summing x previous bars are bigger than current and same for the previous bar. (0 to disable)
  • UseCandleDirAsConfirmation= Check last x candles needed to confirm to be Bullish/Bearish candles
  • CandleDirNoOfCandles=10
  • UseAdxForStrengthConfirmation= Same as at "Trendy Monster Moving Day" to ensure we have some momentum in the market
  • UseSupplyDemandForConfirmation= Inspired by Steve’s Ghostrider EA; this checks the distance to the next support or resistance zone. With this it can be avoided to place an order in front of a support/resistance. Or price must be in a zone. (library from slipshod is used. Indi of that is avaialble there too! Superb stuff!)
  • SupDemMinimumDistance= Required distance in pips to next support or resistance box (0 to disable)
  • SubDemMinimumDistanceHigherTimeFrames= check the price on higher timeframes have also the requred distance to Sup/Res
  • SubDemPriceMustBeInZone= Instead of confirming distance to zone, the price must be in a S/R zone
  • SubDemPriceMustBeInZoneLowerTF= price must be also in next lower S/R zone
  • SetSLtoPullback= Set SL to the upper/lower of the last Resistance/Support zone
  • UseAtrForStrengthConfirmation= Confimration by comparing a slower and a faster ATR where faster need to be x percentage (AtrCFasterMinPercentageOfSlower) of slower to allow trading.
  • UseSuperSlope= The usual suspect
  • SsCompareAgainstPreviousBar= Slope need to be higher than at previous bar
  • UseSessionTimeLimit= Limit Smybols trading time by their sessions. Only Symbols will be traded that are set in the morning and noon sesssions. It is the server time that matters here.
  • UseServerTime= Use the server time for all time calculations and checks. (Found at settings block: Trading hours) This might not be working well yet.
  • UseOsMA= OsMA as confirmation similar as at the Ghostrider EA
  • TakeSnapshot= After opening an order, the chart for the symbol is opened and a screenshot is taken. Nice to review after repainting of zones etc (Tip use my Mail helper EA to get these send to your mail automated)
  • UseDivergenceValuesOsma A try to implement Osma Divergence to be seeked at the last amount of bars set in DivergenceSeekBarsOsma
  • UseVolumes Confirmation of considerable amount of volume: Long--> CurrentVolume > (HigherTFVolume /(volumesCompareAgainstTF/volumesTimeFrame)). E.g. volumesCompareAgainstTF= PERIOD_D1 represents 1440 devided by volumesTimeFrame=PERIOD_M30 represents 30. This results in 48 30min timeslots which are then devided by the total volume of the HTF. So we have an average of the 30min volume for the HTF we compare to current volume.
    TpBasedOnSLMultiply Multiplier for SL to set TP (works in combination with SetSLtoPullback)
    BreakEvenSetTpToSLPips Overwrites BreakEvenTargetPips with the SL pips (works in combination with SetSLtoPullback)
    UseAtrForTSL Use ATR from Stoploss settings for Trailing
    UseAtrForJSL User ATR from Stoploss settings for jumping stop
    SetTPtoRebound Set TP to rebound on trading TF. If no found the fixed TP is used. Future version could take it from next higher TF.
If you enable trace log level you will see how many confirmation checks have been passed with some details. This is helpful to confirm the behavior is as desired (especialy in combination with Mail helper EA).
The EA needs a "SHF core library.mqh" where I have splited common functions into a seperate include file as the EA file just got to difficult to oveview.

I had several demos during the development (which is ongoing for months) a few run decent like this one using ADX as confirmation.
MACD_ADX.png
So this is not a winner for sure yet, however others might be interested and come up with better combinations to make this EA profitable. So time to start sending results to fxtestify.com
If you find any conditions missing or not meet from above videos let me know and I could try to add/adjust.

At last I want to give appreciation to the whole board, great and tidy pleace :!!:
You do not have the required permissions to view the files attached to this post.
Last edited by biobier on Sat Jan 23, 2021 9:53 pm, edited 17 times in total.
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MACD-Rush EA

Post by SteveHopwood »

Great to see this. :clap: :clap: :clap: :clap: :clap:

Here is hoping that something comes of it.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
wallywonka
Trader
Posts: 176
Joined: Thu May 12, 2016 7:46 am

MACD-Rush EA

Post by wallywonka »

Looks excellent mate, will give it a run! :hi:

:clap: :clap: :clap:
User avatar
c1borg
Trader
Posts: 454
Joined: Sun Aug 14, 2016 5:09 pm

MACD-Rush EA

Post by c1borg »

MACD is one of the few indicators Bill Williams trusted. :hi:
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

MACD-Rush EA

Post by biobier »

Guys I got a pm making me aware about that there is a faboulus library to check support and resistance zones with a hint for anohter approach that price must be in the S/R zone of the trading TF and in the zone of the S/R TF-1 to be valid but also weak (not verified) zones should be ignored.

This is added in new version 5.1 at first post.

new inputs are

SubDemPriceMustBeInZone=price must be in S/R zone
SubDemPriceMustBeInZoneLowerTF=price must be also in next lower S/R zone

I have reused some code from "Holy Graily Candle Bob.mq4" thanks again to Steve!
Last edited by biobier on Tue Dec 15, 2020 6:45 am, edited 1 time in total.
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

MACD-Rush EA

Post by SteveHopwood »

biobier » Sat Dec 12, 2020 11:02 pm wrote:
I have reused some code from "Holy Graily Candle Bob.mq4" thanks again to Steve!
My greatest pleasure ever. I am thrilled that you find it useful. You have contributed to to the HGB code and so deserve to use it for your own platform.

I shall give this a bump in my wrup tomorrow. Let us hope that The Serious Brains at SHF join in to help you develop your trading methodology.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

MACD-Rush EA

Post by biobier »

new version 5.2 in first post. Had missed to replace Symbol() with symbol.

DYI: Search for SSSR_UpdateZones and update Symbol() to symbol like below:

Code: Select all

SSSR_UpdateZones(true, symbol, TradingTimeFrame);
            
but also update these two:

Code: Select all

//Finding the support & resistance zones closest to the ask/bid price
res_zone = GetNextResistance(symbol, TradingTimeFrame,SubDemPriceMustBeInZoneLowerTF);
sup_zone = GetNextSupport(symbol, TradingTimeFrame,SubDemPriceMustBeInZoneLowerTF);
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

MACD-Rush EA

Post by biobier »

New version 5.8 is in post 1 with update of new settings.
Change log:
5.3: Adding SuperSlope as a confirmation and Symbol session filter
5.4: Added UseServerTime & SsCompareAgainstPreviousBar
5.5: ATR compare as confirmation
5.6: Added SubDemMinimumDistanceHigherTimeFrames that does check the price on higher timeframes have also the requred distance to Sup/Res (According to latest video on Trading Rush)
5.7: New feature SetSLtoPullback to set the SL to the pull back (for long trades the low of the next support zone and vise versa).
5.8: Bugfixes for insideZone stuff
Feedback is welcome!
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
trader689
Trader
Posts: 644
Joined: Thu Nov 17, 2011 12:53 am

MACD-Rush EA

Post by trader689 »

great thanks biober,

This looks like it has a lot of chops. Looking forward to seeing results in the new year

trader
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

MACD-Rush EA

Post by biobier »

New version 5.11 is in post 1 with update of new settings.
Change log:
5.9: Added UseOsMA as confirmation
5.10: Bug fixes for L-TF inside zone, now supports inside zone in combination with SupDemMinimumDistanceTo
5.11: added TakeSnapshots: snaps when order is created
Feedback is welcome!
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
Post Reply

Return to “Automated trading systems”