量化交易系统

MT4-Hedging Forex EA1

  • 型号:
Main Image


An idea of testing hedge EA in the strategy tester will be given in this article. As you know, the strategy tester has its own limit unabling to open any order for another symbol. Every user that would like to test his/her own hedge Expert Advisors needs to test it/them live only. But does this limit our capabilities? I am sure that every hedge trader needs to test his own EA before trading live. So, I am giving the idea of generating a virtual strategy testing behavior (tester-like) to you all with hope that it can help us break through the mt4 strategy tester limit and hope that it will useful for further usage.

The ATR indicator has been added

When Open_ATR=true

It works in Take Profit mode

programmatically

With the control of the value of the pointer from the period and the timing to work on the pointer from the timeframe

When Open_ATR=false a manual Take Profit is placed

Parameters:

  • Lot1: Manual Lot Size
  • Auto_Lot: Set true to automatically calculate optimal Lot Size based on risk preferences, Set False if you want use manual lot size.
  • Max_Risk: Max Risk as percentage of Equity* the greater this percentage is the greater the lot size if auto lot is used.
  • Take_Profit: Take Profit in points adjusted for 30 or 20 Digits brokers.
  • Stop_Loss: Stop Loss in points adjusted for 50 or 30 Digits brokers   Prefer not to use.
  • Start_Time: Start Time in GMT time. EA starting Time.
  • End_Time: Ending Time in GMT time. EA Ending Time.
  • Max_Open : maximum number of open deals.
  • Max_Lots : And controlling the maximum lot size.
  • Loss_USD :  and closing all together at a loss from Loss use of  Loss usd = zero does not work
  • multiple_total : Control from here Recurrence of complications .
  • Continuous_trading =true Keep working nonstop = false  The Expert is deleted from the chart after the total profit of the transactions .
  • Magic_Number: EA Magic Number

Currency:

Updated on expert

Now you can work on gold with currency pairs

If there are two or three numbers after the decimal point for the price of gold

An extra 0 should be added in front of the Take Profit instead of 20 being 200

If there is only one number after the decimal point of gold

Nothing is added to the Take Profit  it works as it is 20 points

EA technically works on any currency pair, but for best results use

The most volatile major currency pairs are:

AUD/JPY

NZD/JPY

AUD/USD

CAD/JPY

Max Spread = 0.3
Broker link from here

Time Frame:

5 Minute Time frame

Work on the VPS server from here

Minimum recommended amount and Leverage :

Min Recommended Leverage: 1:400 or More.

Capital 5000 Working on only one currency pair of volatility pairs

The size of the first lot is 0.02