MarcGiu

MQL4 Experten

Spezifikation

Dear Fedor,

you finished my EA - very good programming, but I made some big mistakes there.

Now I have a new idea:

 

Main Description "EA Breakout with DynamicTP/SL":


My EA – idea is, that if the price crosses the MA-Line from down to up or up to down then the EA places the order (Sell/Buy, see Part C).

The profit-management depends from the value „S2“. The rules for this management I will explain it in Part D.

 

M5 Strategy Example Sell-Order 




Part A.



Variable

Value-input

Main properties:

=============================

Magic:

Input Magic Number

EA comment:

Input comment

Time frame (Standard: „M5“):

Select value (M1/M5/M15/M30/H1/H4/D1/WN)

Max. Spread (SMAX):

Input value

RMM - Risk-Money-Management (true/false)

Select value („true“ or “false“)

Percentage Risk

Input value

Fixed Lot (if RiskMM=false)

Input value

MA (Default = 200)

Input value

MA method (Default = Simple)

Select value

MA (Default= Median Price HL/2)

Select value

„SOR“ (StartOrderRoutine-value)

(Default = 220)

Input value

SLS1: Stoploss in % from Variable „S1“

Input value

TSLS2: Trailing-SL-“Jump-in“ in % from

Variable „S2“ (Default = 35)

Input value

TSTEP: Trailing-SL-Steps after „SL-jump-in“ in % from Variable „S2“ Default (= 10)

Input value

Trading time (true/false)

Select value („true“ or “false“)

Time setting Start (Default: 00:15)

Input value

Time setting End (Default: 22:45)

Input value


Part B.


  1. After doing all the inputs (Part A), the EA has to wait until the price crosses the MA-Line.

  2. If this happens, this point will be named: C(urrent)C(rossover)P(oint) – „CCP“.

  3. After the price crossing the MA-Line again, the value „CCP“ should be renamend in L(ast)C(rossover)P(oint) – LCP and the current crossing-point will be namend in „CCP“.

  4. Then the last high between the LCP an CCP is calculated by using the FIBO-Tool (see picture), it will be namend „F0“ (Fibo-Zero-Point).

  5. Calculate „S1“-value: S1 = F0 – CCP

  6. If S1 - SOR <= 0 „wait“, else  „Start-Order“ - Routine

Part C

„Start-Order“-Routine


  1. „Sell or Buy“ – Routine: If the price crosses the CCP from up to down, then „Sell“-Order, if vice versa then „Buy“ – Order, depending from Risk-Money-Management-inputs.

Part D

„Stop-Loss and Trailing-SL“ - Routine


  1. S2 = F1 - CCP

  2. SL (Stoploss) = (SLS1 * S1 / 100)

  3. TS (Trailing-Start) = (TSLS2 * S2 / 100)

  4. if price > (TSLS2 * S2 / 100) then set TS to this price, after this, use TSTEP until the SL is reached.


Then continue with B.3.

 

***END***

Have a nice week-end....

many greetings from Berlin...

 

MarcGiu 

Projektdetails

Budget
30 - 50 USD
MwSt (19%): 5.7 - 9.5 USD
Insgesamt: 35.7 - 59.5 USD
Für die Entwickler
27 - 45 USD
Ausführungsfristen
von 1 bis 7 Tag(e)