(Share) Shuhan Hedge EA X-2 (Inspired by XMT)

heshuhan

Member
Dear All,

Attached is an original EA I made. This EA is inspired by combining both the counter-trend and trend-following features of XMT-Scalper courtesy of Master Capella into one.

The EA does not require any indicator.

The logic is primarily placing pending orders in a certain pip gap away from current bid price. It can use pending stops for breakouts, or pending limits for counter-trend, or both can be turned on at the same time.

It has OCO features to focus trading on one direction only, and has many other interesting features pertaining to risk and money management.

Feel free to backtest and suggest improvements. You can try the SET file which is attached, or you may try optimising using your personal parameters found.

The EA does not have expiry date. You can use it freely. The EA must be run using very tight spreads or low commission in a fast trading environment for it to work.

Attach it to M1 charts only. Kindly change the .TXT file to .SET extension. I cannot upload the SET file due to restriction in the uploading system.

Regards,
Mr. He

<b>UPDATED SET FILE</b>: Shuhan Hedge EA Optimized Set 2 SET file courtesy of John
 

Attachments

Last edited:

heshuhan

Member
You must be registered for see images attach


This is a live forward test account at Pepperstone. This was used in the initial version where I tested using Virtual S/l and T/p (id. Hide s/l and t/p).

I find that having them on is better in later tests though.
 

john562

Member
Dear All,

Attached is an original EA I made. This EA is inspired by combining both the counter-trend and trend-following features of XMT-Scalper courtesy of Master Capella into one.

The EA does not require any indicator.

The logic is primarily placing pending orders in a certain pip gap away from current bid price. It can use pending stops for breakouts, or pending limits for counter-trend, or both can be turned on at the same time.

It has OCO features to focus trading on one direction only, and has many other interesting features pertaining to risk and money management.

Feel free to backtest and suggest improvements. You can try the SET file which is attached, or you may try optimising using your personal parameters found.

The EA does not have expiry date. You can use it freely. The EA must be run using very tight spreads or low commission in a fast trading environment for it to work.

Attach it to M1 charts only. Kindly change the .TXT file to .SET extension. I cannot upload the SET file due to restriction in the uploading system.

Regards,
Mr. He

Hello heshuhan,

First of all ,thanks for sharing.Looking at the parameters,this seems like a promising EA.Can we get a manual which explains the parameters of the EA in detail so that we can optimize it?.Its difficult to optimize without knowing the parameters /inputs in detail.
,
 

heshuhan

Member
Here is the explanation for each feature.

"magic" = Magic Number
"useprint" = Print log in journals tab, mainly for error checking.
"soundalert" = Sound alerts when trades are put on.

moneymanagement=Money Management

"lots" = Fixed lots should money management 'mm' be turned to false.
"mm" = Set to True to turn on auto money management feature.
"risk" = In percentage. For example, 1% risk will result in a loss of 1% of account when stop loss is hit.
"minlot" = Minimum lot size acceptable by broker.
"maxlot" = Maximum lot size acceptable by broker.
"lotdigits" = Change to 1 for 3 digit broker. Use 2 for 5 digit broker.
"alembert" = Turns on alembert money management. Google for more information on alembert.
alembertmode=0
increment=2.0
decrement=4.0
resetlevel=500

ordersmanagement=Order Management

"ecn" = Set to True to only modify stop loss and take profit after trades are placed. Latest MT4 do not need this anymore.
"instantorders" = Make the EA put on market orders
"stoporders" = Make the EA put on pending stop orders
"limitorders" = Make the EA put on pending limit orders
"onecancelother" = To keep on placing buy orders when one buy order is hit, and vice-versa
"gap" = Gap distance between pending orders from current bid price
"deleteold"= Delete old pending orders. Not needed anymore.
"oppositedelete" = Delete pending orders when opposite signal is achieved. Not needed anymore.
"oppositeclose" = Close existing orders when opposite signal is hit.
"reversesignals" = Purposely reverse the orders eg. When its time to buy, make it a sell
"maxtrades" = Maximum allowed total number of trades
"tradesperbar" = Maximum allowed orders per bar
"hidesl" = Use virtual s/l, ie. Don't put real orders into broker
"hidetp"= Use virtual t/p
"stoploss" = Stop loss for each order in pips. Eg. 1.0 is 1 pip, where 20 is 20 pips
"takeprofit" = Take profit in pips
"partialtp" = Turn on partial take profit function
"takeprofit2" = First partial take profit target in pips
"tp2percentage" = How much % of position to close should first partial take profit target is reached
"takeprofit3" = Second take profit target in pips
"tp3percentage" = How much % of position to close should second partial take profit target is reached
"trailingstopmode" = 0 means current price to trail. 1 means new price above bid to trail.
"trailingstart" = Number of pips in profit to start the trailing stop function.
"trailingstop" = Trailing stop from current bid price, in pips.
"trailingprofit" = Trailing stop to reduce profit target as the market goes against you.
"trailingstep" = Steps to trigger trailing stops, in pips.
"breakevengain" = Number of pips to trigger breakeven function
"breakeven" = 0.0 means put at exact breakeven. Can be positive or negative.
"expiration" = In minutes. Time for pending orders to expire.
"slippage" = Maximum slippage allowable at the point of entry.
"maxspread" = Maximum spread allowable at the point of entry.

adordersmanagement=Advanced Order Management

"ignoreinitialbar" = To make the EA trade instantly the moment the platform is on. Useful for restarts.
"changedirection" = To make the EA to only buy sell buy sell in opposite sequences.
"onesideatatime" = To make the EA only trade 1 direction at a time for all orders.
"highlowts" = High-low trailing stop feature
"highlowtsmargin" = How many bars away to take reference on high or lows to adjust trailing stops
"rangesl" = Stop loss set using range of markets
"rangesltf"= 0 is current timeframe. You can set to use higher timeframes than M1.
"rangeslperiod" = How many bars to take into consideration the ATR for range stop loss
"rangetp" = Similar to rangesl, except that it is used for take profit.
"rangetptf" = Similar to rangesltf.
"rangetpperiod" = Similar to rangeslperiod.
"usetimefilter" = To enable time filter.
"tradesunday"= To trade since market open.
"fridayfilter" = Set last orders on Friday before market close.
"fridayhour" = In hours. Adjust manually for your broker's GMT timezone.
"fridayminute" = In minutes. Adjust manually for your brokers' GMT timezone.
 

Tici

New member
You must be registered for see images attach


This is a live forward test account at Pepperstone. This was used in the initial version where I tested using Virtual S/l and T/p (id. Hide s/l and t/p).

I find that having them on is better in later tests though.
Hi which settings made this, becuse i test it on pepperstone razor account and every trade loss.
Thx
 

heshuhan

Member
Hi Tici,

The market is not open now. I am assuming you are doing a backtest, correct?

What is the spread that you use to test, which pair, which timeframe and is it 99.9% tick data quality?

Regards,
Mr. He


Hi which settings made this, becuse i test it on pepperstone razor account and every trade loss.
Thx
 

heshuhan

Member
Hi,

No wonder. When the market is closed, the spread is very huge. Since you use actual from the strategy tester it will use the last used spread, which is too large for this EA to benefit.

Can you try to put a typical Pepperstone spread such as 0.3 pips and try again and see what happens. Thank you.

Regards,
Mr. He


Yes it was backtest.
Spread is actual, eur usd M1 timeframe.
 

Tici

New member
Hi,

No wonder. When the market is closed, the spread is very huge. Since you use actual from the strategy tester it will use the last used spread, which is too large for this EA to benefit.

Can you try to put a typical Pepperstone spread such as 0.3 pips and try again and see what happens. Thank you.

Regards,
Mr. He
I sent pm.
Thx
 

heshuhan

Member
Hmmm....Tickmill should not have this issue. Ordersend Error 130 is when stops are too close to be placed to the bid price.

Could you kindly test on EURUSD tick data instead and set spread to 0.5 (average spread in live) and see what happens.

Regards,
Mr. He


You must be registered for see images attach
pppppppppppp
 

murcu1

Member
Hmmm....Tickmill should not have this issue. Ordersend Error 130 is when stops are too close to be placed to the bid price.

Could you kindly test on EURUSD tick data instead and set spread to 0.5 (average spread in live) and see what happens.

Regards,
Mr. He
The same mistake is repeated
 
Top