Page 1 of 1

Help me to create this kind of EA (Grid EA)

Posted: Sun Apr 18, 2010 9:38 am
by cakranegara
Hi all

I've found an EA on other forums, it call mGrid EA.

Please someone, can help me to add some new rules to the EA so it can open based on time entry and price entry.

The logic as explain bellow:

First, The EA will open at specific time (Hours), each time entry the EA will have their own lots, pips, level.

Example:

Use Time entry 1: True/False
Entry Time: 4 (H+4 from broker's opening time), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Time entry 2: True/False
Entry Time: 10 (H+10 from broker's opening time), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Time entry 3: True/False
Entry Time: 13 (H+13 from broker's opening time), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

If time entry 1 set up still not have reach it profit target level, the EA will not open it position on time entry 2 and 3.

Second, the EA will open on specific price level, so if the price reach on specific level/price the EA will open it trade position.

Example:

Use Level Entry 1: True/False
Entry Level: 126.52 (EURJPY), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Level Entry 2: True/False
Entry Level: 125.58 (EURJPY), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Level Entry 3: True/False
Entry Level: 127.69 (EURJPY), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Level Entry 4: True/False
Entry Level: 125.58 (EURJPY), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

Use Level Entry 5: True/False
Entry Level: 129.56 (EURJPY), it can be set up manually
Lots: 0.01, it can be set up manually
Level: 3, it can be set up manually
Increment: 8 (5 point + spread), it can be set up manually
Margin Stop: 10, it can be set up manually

If level entry 1 set up still not have reach it profit target level, the EA will not open it position on level entry 2, 3, 4 or 5.

This EA pure on price action, so it will not need any indicator.

I attach the original EA (mGrid EA)
Thanks for the help...

Posted: Sun Apr 18, 2010 12:45 pm
by noushina
Doubt if anyone will build it for you, but you can do what I am doing and try to learn how to do it yourself.

Go here
http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/

And do the simple tutorial to build a MA crossover EA. Then you can experiment with the results from there and then figure out how to modifity your mGrid.

mGrid looks very clean so it may be a simple matter to add some conditions and mod the ones that are there.

Posted: Mon Apr 19, 2010 11:32 am
by cakranegara
Ok, i'll try it... thanks anyway for the information

Posted: Mon Apr 19, 2010 4:06 pm
by Patch
cakranegara

One other option you can consider is to hire a MT4 programmer. When I started looking for one, I found good, knowledgeable programmers are difficult to find. I've been through several over the years. Nico from Australia is worth his weight in gold. If you go to his website, he offers about a half dozen free indis with source code, so you can see his coding style.

Email: support@pro-fx-experts.com
Phone: +27 79 872 8914 (International)
Cell Phone: 079 872 8914
Phone Hours: 09h00 to 17h00 (GMT +2)
Web: www.pro-fx-experts.com

Patch
InVA

Posted: Mon Apr 19, 2010 4:43 pm
by newschool
Add this in the variables at the top :

Code: Select all

extern bool UseTradeHours = True;
extern int TradeHourStart = 7;
extern int TradeHourEnd = 8;



And this in the Entry condition bracket :

Code: Select all

    && (!UseTradeHours || ((Hour()>=TradeHourStart) && (Hour()<=TradeHourEnd) ))

Posted: Fri Apr 23, 2010 3:55 am
by cakranegara
Which variable that i can use for specific entry level (not a time based level) ?

Posted: Sat Apr 24, 2010 9:26 pm
by newschool
in the top variables

extern double Price1 = 126.52

in the trigger

&& ( MathAbs(Price1-Ask) < 10*Point )


--- Explanation : here I didnt use a simple = to compare price, because you never know if it will be exactly the same as your trigger, thats why I check for a difference less than 1 pip between your target and the market. Price can be a little higher or a little lower, thats why I need to get the Absolute value. The number 10 is for 5 digits brokers, and the Point value automatically change in each pairs.