HedgeRock Welcome to the HedgeRock family. There is a lot of info here , look through it quickly before getting too involved in the reading. Intro HedgeRock combines close to 4 years of studying and experimenting with trading on MT4. You can use it to look for patterns on a pair and trade them on a demo or real account. Dreamboat was the first public release. RocketTech evolved from Dreamboat and finally HedgeRock is the current expression. The latest release 3.76 is the most advanced yet, with 10 indicators , averaging and pyramiding. HedgeRock works well. It may still have some bugs. You may be able to suggest a better way of doing it. Its has run for some time with no issues, although the latest updates of course have not been tested that long but the core works. Basics To turn a feature off, often large values are used to save the number of settings. Setting a value that is unreachable will make it irrelevant or cause an error (dev by zero for eg). For speed , there is very little checking done so inappropriate decimal values and negative values can sometimes create interesting unpredictable results(not recommended). Processing logic HedgeRock starts by looking at the equity and money management and taking action. if averaging is on, It then averages all open orders and acts accordingly. If speed is off (false) it then will then go through each order and evaluate it against the stoploss, takeprofit and other settings such as trailing stops and act accordingly. Once this is done it will check to see if it needs to open a new order. Once that is done it updates the panel and waits for the next tick. Modes To start with we should use Mode 2 with Mode 3 with FIFO rules and Autolot off . This is the least complex and possibly the only mode you need. Set the following to activate Mode 2 (iADX) with Mode 3(Averaging) with Mode 6(FIFO) with Mode 9 Autolot off (Autolot 1:1) Set Mode 2 Under the iADX section the setting UseADXLots = 0 Set Mode 3 FIFO = true CloseOnDirectionChange = false CloseOnAverage = true Speed = true COACarryLoss = true Set Mode 9 off (Autolot off) Designed AutoLot Equity = 1 Actual AutoLot Equity = 1 HedgeRock has a few modes outlined bellow, for more technical explanation. However it can get very complex so to begin with just use above settings and skip this until or if you need more: 1. Price action mode - only use indicators when the recovery lots get to the lot size set for the iADX indicator. 2. iADX Mode - every trade uses indicators, the minimum lot for iADX is set at 0. 3 Above modes but with averaging all the open orders profit or loss (SPEED on and CloseOnAverage is True) 4 Mode 3 With Buys and Sells averaged separately (only makes a difference on non FIFO accounts - COASeperate is True) 5 Mode 3 or 4 with SPEED false . After checking the averages, processing it is passed to stoploss and takeprofit processing. 6 The above modes but with FIFO rules. SPEED must be set to True for FIFO to work as normal processing will not consider FIFO rules although we can make them with careful settings to always close before opening a new direction 7 FIFO with close on direction change. Inn this mode before an order is opened it checks to see if it goes against FIFO. if so instead of ignoring it , HedgeRock closes all the orders and starts in the new direction with a new order and optionally carrying the current profit or loss total. 8 Averaging modes without carrying the profit or loss when orders are close (COACarryLoss is false) 9 Any mode with Autolot processing (Designed Autolot and Actual Autolot not 1 : 1) Mode 5 combines both Averaging and “normal” processing. This allows complex trading patterns that takes advantage of both systems together and is only FIFO compliant if the strategy closes before changing direction. Mode 1 - Price Action mode UseADXLots is larger than the Nextlot. SPEED is false. When indicators are only used for recovery, HedgeRock starts out opening a hedge at the Startlot value. On each tick, every order is evaluated according to the settings and dealt with accordingly. As you run through the settings, you will see what each order is being evaluated against and how it will be dealt with. The logic starts off simple but can evolve to be very complex if you want it to. When an order is closed in loss its losses are evaluated. When an order closes in profit its profits are evaluated. Things like spread, commission, slippage are considered. A measurement of the loss is processed and a Carrylot is calculated. The Carrylot is by default set to compensate for the loss in the next opened order. A total of the carrylots is kept as the Nextlot. New orders are opened using the Nextlot in a bid to compensate for the previous loss. The maximum next lot (Maxnextlot) can be managed as well as the Carrylot using the "Breaklots" and "Recovery" section. Many orders can be opened and are separated by the distance of Points between each level "PointsBetweenLevels". The EA tries to keep this distance and only have open 1 order at a level at a time. It will open new orders at each level it reaches according to rules of the "MaxOrders" and "OrdersPerTimer" You can have orders opened against the trend by increasing the number of allowed in loss orders “OrdersPerTimer” per period "Timer" in hours . Settings in the Levels , Lots and Order Timer sections apply. Once the Nextlot has reached the UseADXLots value , orders are passed to mode 2 before opening. Mode 2 - iADX mode Once the UseADXLots value has been reached by the Nextlot (always mode 2 if UseADXLots is 0) Mode 2 is activated. In mode 2 orders are only opened when they meet all the set criteria of all the active indicators. It is first evaluated by the iADX section , then if it passes the rest of the indicators are checked before opening. To exclude the iADX itself you can make all the conditions met by any angle or value of the iADX. In the settings section the bypass iADX and other indicator settings will be shown. Mode 5 Combines both Averaging and “normal” processing. This allows complex trading patterns that takes advantage of both systems together and is only FIFO compliant if the strategy closes before changing direction. Mode 9 - Autolot mode Basics - Autolot is disabled in the LOTS section by setting Design Autolot Equity to 1 and the Actual Autolot Equity to 1. Complex - In order to allow a growth factor without adjusting all the settings according to the growth, an Autolot Ratio can be set. In this way a set that works on $10000 for example can be used on $1000000 with the same growth in percentage. By setting the Designed Autolot Equity to 10000 and the Actual Autolot Equity to 1000000 , processing will be done through Autolot. Since 1000000 is x100 the 10000 , the values of the lots and the closing on average values will be x100. This is shown on the Panel. To make it dynamic, setting the Actual Autolot Equity to -1 will substitute the Current Account Equity. Using -1 in the Actual Autolot Equity allows the growth to compund as the Autolot is dynamically calculated on the Current Account Equity. The Autolot is a seperate level of processing. It is the last process to be calculated before opening a new order so as not to affect how the set works and keep symmetry as it grows in a compound fashion Settings - In the order they appear EvaluationDelay = 0 EvaluationDelay - 0 every tick, 5 -M5 , 60 - H1 Basics - set to 0. Complex - make it 0 for live trading , this is only for backtesting to speed up the evaluation where the gap will not make a difference to the strategy or to avoid sharp quick return movements in live trade but should be 0 for live trading. If on in live trading it will simulate the backtester setting of “open prices only” WARNING!!!! money management is also excluded the EA is effectively off at this time. PRO - makes it stable - CON make sure your account can take the sudden spike. CloseAllOrdersNow = False - in live trading set this to true and all the orders on the pair with matching magic number and manual trades will be closed and trading will stop . set it back to false and trading will continue. CloseAllOrdersNowCarryPL = False - similar to CloseAllOrdersNow but the Average Profit or Loss is carried ______FIFO______ FIFO = true Basics - To enable FIFO properly, the correct mode (explained above) must be selected. FIFO true does the following. Closing on average orders are processed in the FIFO order. Before a new order is opened it is checked to see if it will break FIFO rules and if so it is prevented. Speed must be set to true for FIFO to work properly. Complex - If set to False orders may be closed in the wrong order. HedgeRock should continue trying to close the next order it wants to close and come back to the previous ones but it will cause a FIFO error from the server (which may or may not be an issue). CloseOnDirectionChange = false Basics - leave on false Complex - if set to true, when an order is sent which goes in the opposite direction to the current orders, they are closed and if COACarryLoss is true , the profit or loss is carried. ______Averaging______ CloseOnAverage = true - enable or disable closing on average Speed = true - Bypass Stoploss and Takeprofit checking Basics - set to true when CloseOnAverage is true , set false if CloseOnAverage is false Complex - mode 5 if you want to combine averaging and stoploss takeprofit processing set to false and set CloseOnAverage to true CloseOnAverageProfit = 5 Basics - This is the average profit amount in the account currency that will trigger close orders in profit. Complex - If Autolot is enabled this is calculated accordingly to match. CloseOnAverageLoss = 10000 Basics - similar to CloseOnAverageProfit but in loss. Complex - Because this can be triggered repeatedly, each time it is activated, a record is kept and is only cleared when they losses are covered (if COACarryLoss is true) The Autolot affects this value COACarryLoss = true - if true , losses are carried when closed in loss or slippage occurs and attempt is made to make up for them on the next cycle. COACarryLossAmount = 0 Basics - used to manually adjust the carried profit or loss. Any change in this amount is reflected in the Carried P/L Complex - If you make this -100 then HedgeRock will carry an extra 100 in loss and try and make up for it, if you make it 0 it will do nothing. It only changes the carried loss once when the setting is changed or if MT4 is restarted and the value is not 0. if you made it -100 to carry an extra 100 in loss and want to make another 100 in loss, it must be changed to 0 and then back to -100 and then - finally to ensure you don't save it or restart with it set, put it back to 0. the change has been made internally and the setting is no longer required and should be set back to 0. COASeperate = false - if set to false all orders will be totalled together for averaging. If set to True, buys and sells will be evaluated and closed separately from each other. MaxProfitInPeriod = 40 Basics - When the equity grows by this amount in account currency, all orders are closed. Complex - This setting is affected by all the EAs and pairs on the account because it tracks the equity. If multiple EAs are running it will be triggered each time the equity grows by this amount. The Autolot affects this value HoursOfProfit=20 Once the MaxProfitInPeriod is triggered and orders are closed, trading is suspended for the hours of HoursOfProfit and then started again. ______LOTS______ Carrylots - added to the Startlot. When you restart MT4 the Nextlot is cleared you can make a note of it and put it into the Carrylots and it will continue. You can also add to the next order at any time but by changing the Carrylots. Once it is added the Carrylot is reduced as normal but the setting itself does not change. it only reacts to changes , so if you change it from a value bigger than 0 to 0, the nextlot will clear aswell. >>>>StartLots - Minimum Lot to start opening orders. The lots size will increase to compensate for losses but will start here once all losses are accounted for. The Autolot affects this value TurboLotGrowthFactor = 0 - TurboLotGrowthFactor - if not 0 - Until close, each next lot is multiplied by this factor TurboLot = 0 - TurboLot - Until close, each lot is bigger by this lot size MaxNextLot = 10000 - lots over this size are limited from being opened - When the recovery lots or the growth factor lots get too big they can be limited and let out at the rate of MaxLotMultiply at a time MaxLotMultiply = 0.667 the nextlot becomes the maxnextlot times this value. This allows you to open smaller lots or bigger lots in proportion to the MaxNextLot CurrentLot = 1000 - Designed AutoLot Equity - Account size AutoLot Denominator AutoLot = -1 - Actual AutoLot Equity (-1 Current Equity) Account size AutoLot Numerator 1 Experimental - ignore AllowNegativeNextLot = false - AllowNegativeNextLot - if true, positive results can offset future recovery 2 Legacy settings could conflict with autolot PauseMultiple - StartLots x PauseMultiple = pause new orders activated if this is set to 100 and the startlot is 0.01 , when the nextlot gets to 1.0 (100x0.01) then the EA will stop opening trades for the "Hourstowait" Hourstowait - hours to pause for market to change/settle ______Levels______ TakeProfit (Points) PointsBetweenLevels (Points) Buy StopLossLevel x PointsBetweenLevels = Stoploss points Sell StopLossLevel x PointsBetweenLevels = Stoploss points MaxOrderLoss - Closes order at the loss value in account currency . for emergency drawdown protection. will not stop next order. Once an order is in loss, at some point we will want to start trading in the opposite direction ReverseOnBuyLevel x PointsBetweenLevels = Direction Change points ReverseOnSellLevel x PointsBetweenLevels = Direction Change points Each time an order is closed in loss, if it is the highest losing buy or lowest losing sell it value is kept. if the price is reached again the levels around it can be avoided by skipping the levels around it. If it is a new session, you can set the level manually and it will onlt be changed internally when a new order is closed in loss. Setting Skiplevels to -1 the option is deactivated. LowestBadSell = 0 HighestBadBuy =1000000 SkipLevelsBeforeBad = -1 SkipLevelsAfterBad = -1 ______iATR_PointBetweenLevels_Stoploss_Reverse___ The ATR indicator can be used to dynamically adjust the points between levels for stoploss and directionchange. The distance for opening is not affected (this may be a good option to add at some point) ATRMultiplier - 0 is off - Multiply ATR and PointsBetweenLevels by this factor to increase the stoploss and direction change points when the ATR increases The effective points between levels is displayed on the panel in non averaging modes ATR Timeframe ENUM ATR Period ATR Shift 0 - current ______ORDER_TIMER______ We may want to limit the number of orders open at a time, perhaps only one direction aswell. We may only want to open orders when there is a good amount of equity available. And pause between opening the next order or allow a maximum number in a period. This is where we set this. MinMarginOverEquity = 0 - Minimum free margin to equity ratio to place a trade . 1 means all margin must be available ie no other orders open. .5 means 50% should be available OneBuyOrderTime - Only one order allowed in Seconds OneSellOrderTime - Only one order allowed in Seconds >>>>>MaxOrdersBuy - Maximum open Buys >>>>>MaxOrdersSell - Maximum open Sell Timers are used to decide how much history to consider when deciding how many orders to open in each direction. The timer is in hours. Once an order opentime passes the time it is no longer considered. Open and closed orders are counted. If a direction change is triggered buy ReverseOn level then the count is restarted. This allows for example if 10 orders are allowed but only one in loss, and the price runs and no new orders are opened in the losing direction. Eventually the price will change direction again and once the ReverseOn level is exceeded another order will be allowed as the in loss order is not counted because the direction changed. You can set the direction change very high to avoid this if required. There are also options to exclude iADX exclude closed order history and not reset the count on reverse. Timer - Hours till direction retry 0.5 = 30min BuyOrdersPerTimer - Max in loss buy orders during Timer above SellOrdersPerTimer - Max in loss sell orders during Timer above Deciding on which orders to take into account for the timer >>ADXIncluded - True = ADX orders will also be restricted ResetOrderCountonReverse - True = Clear Orderspertime on direction reverse If set to True , each time the direction changes the counter will be reset and allow more orders. if false the count will remain. Higher drawdown if true but more profit. IncludeClosedOrders - False = Ignore closed orders Only use the currently opened orders for the timer and count. Depends on your strategy Closedinlossonly - True = Ordersclosed in profit are excluded from the count even if they would currently be in loss ______VOLUME______ The average volume of the bars in Period are calculated and trading is only allowed when the volume is between the min and max range. This way you can stop trading once a volume is reached allowing orders to close as the price continues or you and allow it to measure when the market is in a range MinAverageVol=0 MaxAverageVol=1000000 AverageVolTF=60 AverageVolPeriod=1 AverageVolShift=0 ______TIME______ >>>>>>>>>>StartHour - hour after midnight to start opening orders EndHour - hour after midnight to stop opening orders CloseTradesEndofSession = false DreamtimeMarginSec = 1500000 EnableDreamtime = False ______Secret_Indicator_1______ SI1Confirm - if True the SI1 is used to confirm, ADX SI1Extended - gives extra range SI1TF = 60 SI1 Timeframe ENUM SI1BarsBack=7 ______Secret_Indicator_2______ SI2 Timeframe ENUM SI2 Period SI2 Shift 0 - current SI2 ENUM Applied Price 0- close SI2BarsBack=0 0 - turns indicator off SI2Min =30 SI2Max =70 ______Prop_Indicator_1_____ PI1 Indicator uses the fractals indicator on all timeframes below and including the set time frame. Fractals are searched for on the numbers of bars back. PI1Confirm - if True the PI1 is used to confirm, ADX PI1 Highest Timeframe ENUM Fractal Period PI1 Shift 0 - current PI1 Bars Back to search ______Prop_Indicator_2______ The Relative Strength Index. The reading ranges between 0 and 100 .. 80 and above is considered overbought so not as many buyers , 20 and below is considered over sold so not many sellers. We need to understand that often when approaching the overbought for example it is actually the time when the most buying is happening so while a reversal is expected it may be a strong buying trend that is masking a huge buy movement The keep the price from going up quickly large buyers will buy relatively slowly keeping the price in the overbought while the price goes up. PI2 Indicator uses the RSI indicator on all timeframes below and including the set time frame. Only the highest timeframe is used for the gradient PI2 Highest Timeframe ENUM PI2 Period PI2 Shift 0 - current PI2 ENUM Applied Price 0- close PI2BarsBack=15 0 - turns indicator off PI2Gradient=2; PI2BuyMin =0; PI2BuyMax =75; PI2SellMin =25; iPI2SellMax =100; ______Prop_Indicator_3______ PI3 Gives an insight into the secret indicators. PI3 uses the RSI indicator (described previously in Pi2) and looks back at all the barsback and checks if they are below the min or above the max. They are then totalled to see if more time is spend below the min or above the max. When there is a trend, often the price will stay in the top or bottom half of the RSI on average. If it spends more time above 60 for example this means the trend is buying and going up. Similarly if it spends more time below 40 for example this means the trend is selling and going down . PI3 Period PI3 Shift 0 - current PI3 ENUM Applied Price 0- close PI3BarsBack=0 0 - turns indicator off PI3Min =50; PI3Max =50; ______Moving_Average______ Price vs Moving Average. Using 3 different Moving Averages of a timeframe , the required gradient but additionally how far above or below the price must be in a set range. for example you can say the Price must remain -0.0001 to 0.0001 above or below the relevant MA while the MA has a gradient of 1 point. Buys will be the reverse of sells MA Timeframe ENUM MA Period MA PeriodC MA PeriodD MA Shift 0 - current MA ENUM Applied Price 0- close MAMethod = 0; MABarsBack=0 0 - turns indicator off MABarsBackC=5; MABarsBackD=5; MAGradient = 1; MAGradientC = 1; MAGradientD = 1; PriceMAGradientMin = 0.00001; PriceMAGradientCMin = 0.00001; PriceMAGradientDMin = 0.00001; PriceMAGradientMax = 100000; PriceMAGradientCMax = 100000; PriceMAGradientDMax = 100000; ______Fractals_Confirm_iADX______ FractalConfirm - if True the Fractal is used to confirm, ADX Fractal Timeframe ENUM Fractal Period Fractal Shift 0 - current iFractal Bars Back to search ______iATR_Confirm_iADX___ The Average True Range indicator can be set to a required range and a minimum or maximum gradient. If its gradient is upwards it is getting more volatile and similarly downwards the trade is slowing. iATR Timeframe ENUM iATR Period iATR Shift 0 - current iATRConfirmBarsback = 0 0 - turns indicator off iATRConfirmGradientMin = 5; iATRConfirmGradientMax = 7; iATRConfirmMin - Minimum ATR to allow iADX iATRConfirmMax - Maximum ATR to allow iADX ______iRSI_Confirm_iADX___ The Relative Strength Index. The reading ranges between 0 and 100 .. 80 and above is considered overbought so not as many buyers , 20 and below is considered over sold so not many sellers. We need to understand that often when approaching the overbought for example it is actually the time when the most buying is happening so while a reversal is expected it may be a strong buying trend that is masking a huge buy movement The keep the price from going up quickly large buyers will buy relatively slowly keeping the price in the overbought while the price goes up. iRSI Timeframe ENUM iRSI Period iRSI Shift 0 - current iRSI ENUM Applied Price 0- close RSIBuyMin =0; RSIBuyMax =100; iRSISellMin =0; RSISellMax =100; ______iADX______ The iADX indicator can be used to decide when new order are opened. It is only used when the orders are above the "UseADXLots" . You can set it to 0 to process all orders via iADX. When all conditions are met an order will open. UseADXLots - Use the iADX indicator for lots over iADX Timeframe ENUM 1 for 1min 5 for 5min 15 for 15min 30 for 30min 60 fot 1hour 240 for 4hour 1440 for 1Day 10080 for 1Week etc https://docs.mql4.com/constants/chartconstants/enum_timeframes iADX Period iADX ENUM Applied Price 0- close - https://docs.mql4.com/constants/chartconstants/enum_timeframes ADXBarsBack - Compare current ADX to previous ADX this many bars back on the iADX Timeframe ADXMustCross only trigger if Di's have crossed The below ADX values range from 0-100 and have fractions the gradient can be -100 >>ADX Trigger for Main must be above this ADX Max for Main must be below this ADXTriggerDiff - Gradient - Minimum Difference between current and previous 0 for flat or any up. -100 doesnt matter 0.01 must be slightly up >>ADX Trigger - Di must be above this ADX Max - Di must be below this ADXDiTriggerDiff - Gradient - Minimum Difference between current and previous >>ADX Trigger - reverse Di must be below this ADX Min - reverse Di must be above this ADXDiConfirmDiff - Gradient - Minimum Difference between current and previous ______CloseiADX______ UseADXSLLots - Use the iADX Stoploss indicator for lots over UseADXSLPoints - Hard stoploss in Points iADXSL Timeframe ENUM iADXSL Period iADXSL ENUM Applied Price 0- close ADXSLBarsBack - Compare current ADX to previous ADXSLMustCross only trigger if Di's have crossed >>ADXSL Trigger for Main. Droping below closes ADXSLTriggerDiff - Minimum Difference between current and previous ADX >>ADXSL Trigger for Di if it drops below then closes ADXSLDiTriggerDiff - Minimum Difference between current and previous ADX >>ADXSL Trigger for reverse Di if it moves above closes ADXSLDiConfirmDiff - Minimum Difference between current and previous ADX ______Hedge______ Timeframe ENUM for Hedge Open Trigger HedgeClassOver - Orders greater than size are classed as Hedge HedgeCloseTrigger - Percentage from peak profit to close HedgeTakeProfit - minimum points hedge must make HedgeOver - hedge summary differences greater than .. The buys and sell orders are totalled to get an effective summary. of the summary is either negative or positive by this amount or more the next order in the opposite will be placed as a hedge to make the summary 0 unless HedgePlus is on then is will add the nextlot. The hedge is not limited by the maxnextlot. It will always try and make the summary 0 (or plus) HedgeBuyOverLevel - Number of levels before Sell hedge is applied HedgeSellOverLevel - Number of levels before Buy hedge is applied HedgePlus - false - hedge or true - hedge plus nextlot . if false only hedge to the summary to make it 0 or if true - hedge plus nextlot .. increases drawdown when true but makes more profit ______RECOVERY______ When an order closes in loss a recovery (martingale) lot is calculated with the following ratios >>>>>>LossRecoveryRatio - 0 - dont compensate (no recovery) 1 - calculate a carrylot size that will recover the loss in one takeprofit 1.2 - add 20% etc Max1stRecoveryLotSize once the recovery lot gets to this size then the 2nd recovery lots ratio is used 2ndLossRecoveryRatio- 0 - dont compensate(no recovery) Max2stRecoveryLotSize once the recovery lot gets to this size then the 3rd recovery lots ratio is used 3rdLossRecoveryRatio- 0 - dont compensate(no recovery) Max3stRecoveryLotSize this is the final ratio for any recovery 4rthLossRecoveryRatio- 0 - dont compensate(no recovery) ______TRIGGERS______ Once an order in profit gets to the takeprofit it can become a trailing in percentage by the return trigger. If the price falls below the TP before the trigger is reached the order is left open to see if it can go higher. 1.1 would mean immediate as it gets to the TP with no dynamic nature. >>>>>>>>ProfitTrigger - 0.9 allows 10% pullback before closing once takeprofit met LossTrigger - 1.1 closes losses at stoploss .. 0.6 waits for 40% retrace >>>>>>>>>Lotgrowth - 0.5 Startlots increase at 50% of equity increases more used for backtesting but as the balance grows the startlot can also grow by this factor 1 would mean if the equity doubles the startlot doubles. .1 would mean when the euity doubles the startlot increases by 10% . 1 being 100% . Very high risk can set this to 2 to incease the startlot faster than the equity is increasing as it will drop again if the equity decreaes causes possible huge growth or total failure. the reset on percentage or "EquityTargetPercent reset " can be used with it as it will reset the equity and therefor also the startlot. allowing a quick climb and then reset bcak to original lots. ______SPECIAL_MANAGEMENT______ Special Management is used to set a trailing stoploss or alternate stoploss to orders over a size SManageLotsOver SManageLotsOver - Special Management for lots larger than SMLOStoploss - Stoploss Points for Special Management. The stoploss levels are ignored for these lots. it is replaced with this value in points. Once the order reaches a points in profit "SMLOTrigger" to trigger the trailing stop, the trailing stop of "SMLONewStopLoss" points in profit is set. if the price goes back to that value the order is closed and recovery calculated if it was a recovery order that didnt recover. SMLOTrigger - Points in Profit at which to trigger SMLONewStopLoss SMLONewStopLoss - Points in Profit for new Stoploss 0 = breakeven ..... -10 = 10 points in loss The "SMLONewStopLoss" is fixed and does not trail behind as the price climbs unless "SMLODynamicTakeProfit" is set to True. If set to True the order will only close when it reverses from its maximum reached price and price difference reaches the difference between "SMLOTrigger" and "SMLONewStopLoss" SMLODynamicTakeProfit - false will close on regular takeprofit ______MONEY_MANAGMENT______ MinimumEquity - Emergency failsafe stops trading and closes all orders - must be restarted or removed and added back to continue trading MaxEquityDrawDown - 0.1-10% 0.3-30% Emergency failsafe stops trading and closes all orders ResetonMaxEquityDrawDown - 0.1-10% 0.3-30% >>>>>>EquityTargetPercent reset - 2 is double equity closes all trades and restarts trading when percent equity target reached >>>>>>EquityTargetValue stop - closes all trades and stops trading when equity target reached ______SPREAD______ Sometimes the spread goes very low or very high and this can cause orders to open or close prematurely. >>>MaxSpread - Max spread to accept, if the spread is above this the EA will not trade. MinSpreadOpen - If the spread is below this the EA will not open an order. MinSpreadCloseProfit - If the spread is below this the EA will not close an order in profit. MinSpreadCloseLoss - Increase avoids early loss with big spreads MinSpreadReverse - Increase avoids early reverse with big spreads The history of the highs and lows etc is not kept for the ask, only the bid is kept. So with some spread changes some false readings can occure when history is concerned. To combat this we decide an average spread to use for the history of the Ask instead of the current fluctuating spread. We choose to use it or not with "UseInternalSpread" . Set to true once you have chosen your avaerage spreat to use "InternalSpread" InternalSpread = 100 UseInternalSpread = false ______SLIPPAGE_COMMISSION______ OpenSlippage - Max Slippage on OpenOrder CloseSlippage - Max Slippage on CloseOrder SlippageRecoveryRatio - 1 = Carrylot added to recover lost slippage profit over 1 takeprofit CommissionRecoveryRatio - 1 = Carrylot added to recover lost commission profit over 1 takeprofit _________NEWS_________ newsurl = “http://calendar.fxstreet.com/" To allow HedgeRock to read the news , add to MT4 tools>options>expert advisor the URL http://calendar.fxstreet.com/ Set all the news options here NEWS_FILTER =false TRADE_NEWS =false NEWS_IMPACT_LOW =true STOP_BEFORE_LOW =30 START_AFTER_LOW =30 NEWS_IMPACT_MEDIUM =true STOP_BEFORE_MEDIUM =30 START_AFTER_MEDIUM =30 NEWS_IMPACT_HIGH =true STOP_BEFORE_HIGH =30 START_AFTER_HIGH =30 News_Currencies ="XAU,USD,EUR,CAD,AUD,NZD,GBP,CHF,RUB,ZAR" Search_News =false Specific_News_Text ="employment" DRAW_NEWS_CHART = true XX = 10 Chart X-Axis Position YY = 280 Chart Y-Axis Position News_Font ="Arial" Font_Color =clrYellow Font_Size=8; DRAW_NEWS_LINES =true Line_Color =clrDeepSkyBlue Line_Style =STYLE_DOT Line_Width =1 ______INFO_PANEL______ Adjust the panel for your screen and colour and font preferences cpanelcolor = clrBlack fontsize = 14 Font = "Trebuchet MS"; panelhigh =550 panelwide =550 footer = " HedgeRock EA"; footersize = 25 ______MISC______ MAGICNUM = 20222222 use this for your magicnumber (any number to differenciate between other EAs on the same pair. if you use it on a different pair the number can be the same but any two EAs on the same pair must have different numbers to not interfere with each other or if you want them to both manage the same orders then they must be the same) OrderComment - string to add to orders as a comment Verbose = false .. set to true to see the EAs comments Please let me know if you have any questions? Best regards Aldo Ronchese aldo1003@gmail.com