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

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

User avatar
cakranegara
rank: <50 posts
rank: <50 posts
Posts: 6
Joined: Tue Aug 25, 2009 6:18 pm
Reputation: 0
Location: Indonesia
Real name: Fajar
Gender: Male
Contact:

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

Postby cakranegara » Sun Apr 18, 2010 9:38 am

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...
Attachments
mGRID ver7.0.mq4
mGrid EA
(10.08 KiB) Downloaded 158 times
BESTFXPIPS.COM

Best Forex Rebate 90% CashBack and Bonus Return

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
noushina
rank: 50+ posts
rank: 50+ posts
Posts: 147
Joined: Fri Sep 25, 2009 10:50 pm
Reputation: 0
Location: Fukushima Japan
Gender: None specified

Postby noushina » Sun Apr 18, 2010 12:45 pm

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.

User avatar
cakranegara
rank: <50 posts
rank: <50 posts
Posts: 6
Joined: Tue Aug 25, 2009 6:18 pm
Reputation: 0
Location: Indonesia
Real name: Fajar
Gender: Male
Contact:

Postby cakranegara » Mon Apr 19, 2010 11:32 am

Ok, i'll try it... thanks anyway for the information
BESTFXPIPS.COM



Best Forex Rebate 90% CashBack and Bonus Return

User avatar
Patch
rank: 500+ posts
rank: 500+ posts
Posts: 941
Joined: Sat Jan 06, 2007 6:13 pm
Reputation: 0
Location: Virginia
Real name: Jeff
Gender: Male
Contact:

Postby Patch » Mon Apr 19, 2010 4:06 pm

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
ENOUGH being a Yalie for me Back to the Sea. "What i can lose, i can win" "YES YOU CAN" - dragon33 -"Pick one method and one pair and stick with them until you master it. "The choice is yours - success or failure." TRO

User avatar
newschool
rank: 150+ posts
rank: 150+ posts
Posts: 489
Joined: Fri Aug 21, 2009 2:26 am
Reputation: 1
Gender: Male

Postby newschool » Mon Apr 19, 2010 4:43 pm

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) ))

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
cakranegara
rank: <50 posts
rank: <50 posts
Posts: 6
Joined: Tue Aug 25, 2009 6:18 pm
Reputation: 0
Location: Indonesia
Real name: Fajar
Gender: Male
Contact:

Postby cakranegara » Fri Apr 23, 2010 3:55 am

Which variable that i can use for specific entry level (not a time based level) ?
BESTFXPIPS.COM



Best Forex Rebate 90% CashBack and Bonus Return

User avatar
newschool
rank: 150+ posts
rank: 150+ posts
Posts: 489
Joined: Fri Aug 21, 2009 2:26 am
Reputation: 1
Gender: Male

Postby newschool » Sat Apr 24, 2010 9:26 pm

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.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “beginners forum”