# Around 90% Accurate Trades. Let's make the EA! - page 4

1037

ahillsdale:
Wolfe,

Thanks for developing this!

Could you tell me a little about it's logic, and gap size parameters so I may better understand what it's looking for every Sunday evening?

Thank you.

Hello ahillsdale,

I basically attempted to code the EA following your rules from the first post in the thread. (the best I could understand)

I'm not sure what your coding skills are, but here is how it works:

In the Init() section of the code, when you attach the EA to ANY chart, the EA records the current prices of all the pairs I listed into an array. This is why it is important to attach the EA on Sunday when the market is CLOSED, this will ensure that the Friday close prices are being saved.

When the market opens, the start() function of the EA is triggered, and the Sunday open prices are then saved into an array. Next the EA computes all the gap sizes for all the pairs, and saves them into another array. The gap size array is then sorted with a function to determine which pair has the largest gap, and that pair is returned from the function. This is the pair we are trading, the pair that has the LARGEST gap.

External EA parameters:

extern double Stop_Variable = 3.5;//multiply gap by this number for stoploss

extern int Profit_Variable = 1;//takeprofit will be Fri close - spread - this number

extern double Lot_Size = 0.1;//Lot size to trade

extern int Magic_Number = 44648;//Unique Magic Number

Hope this helps. I wasn't exactly sure on the TP. The SL will be the gap size * the Stop_Variable.

9

Some thoughts

Why only trade the pair with the highest GAP?

I'm just thinking about playing the GAPs of (neg.) correlated pairs

If e.g. EURUSD opens with a GAP, USDCHF is likely to have a GAP also. If the E/U GAP closes so it probably will on U/C. To trade it safer one could close all as soon as on pair has reached TP

The other point I'm thinking about is to play a possible retest of an unclosed GAP. If price breaks through there's no support/resistance until the other side of the GAP

What do you think?

1037

iwjw:
Why only trade the pair with the highest GAP?

I'm just thinking about playing the GAPs of (neg.) correlated pairs

If e.g. EURUSD opens with a GAP, USDCHF is likely to have a GAP also. If the E/U GAP closes so it probably will on U/C. To trade it safer one could close all as soon as on pair has reached TP

The other point I'm thinking about is to play a possible retest of an unclosed GAP. If price breaks through there's no support/resistance until the other side of the GAP

What do you think?

Good ideas. The EA I coded only trades the largest gap, but trading multiple gaps would I'm sure prove successful. As long as you have enough margin in your account to do so.

9

Weekly open 2010/04/25

I'm long e/u @1.3348 for about 20 pips profit

Depending on australian open I might add a short usdchf

3

Yes, I am long EURUSD from 1.3339.

Is a possible to get a copy of the gap ea that is mentioned in this thread?

9

Gap ea

Open the attachments of this thread and from there you can download the EA....(or walk through all recent posts)

9

nice start into the week..got my 20 pips and can take monday off

No major news for both pairs during the weekend

e/u going with a short term uptrend u/c with a short term downtrend into the weekend....both open against the latest trend and fill the gap

Does that tell me something....I don't know?....

1754

Gap is generally consider to be 40 to 60 pip

not many participants traders right after the gap

for back to back cross currency -- if gap occur in weekdays, don't even think of it will fill up the gap (quickly)

for USDX after weekend gap : the hole could be filled back in 1/2 day -- imagine the earth rotation, it does make sense

but there is also weekend that appear in 1 single currency

in the following Monday-- the gap could be something to watch out for

but one universal truth about gap -- many of your indicator will not work for quite a while --- if it does appears

-- so gap may not be that straight forward and simple

----- EVEN we are into Manual entry only, we could learn from EA too --- [ not its strategy though , we can't do it that quick and decisive as EA ]

but during Manual entry -- ENTRY should be analystic ++ after opening, we should be emotionless // exit and cut could take advantage or avoid Higher Volatility

and EA that is suitable for manual entry -- that should avoid Impulsive Entry behavior == actually , we could watch several EA in action -- to be decisive on our ENTRY too (i.e. few EA on 1 currency that you like, then , you translate to Manual entry)

255

Files:
1037

daCoops:
Hi All, This is my first post in this whole forum (3 month lurrker!) and I've changed Wolfe's program so that it only trades on one currency at a time. (Hope you don't mind me changing your code Wolfe and re-posting it here)

No worries. Feel free to do whatever you want to the code. I made it for everyone to test and play with.