![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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 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 NumberHope this helps. I wasn't exactly sure on the TP. The SL will be the gap size * the Stop_Variable.
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?
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.![](https://c.mql5.com/forextsd/smiles/teeth_smile.png)
Weekly open 2010/04/25
Anyone in a trade?
I'm long e/u @1.3348 for about 20 pips profit
Depending on australian open I might add a short usdchf
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?
Gap ea
Open the attachments of this thread and from there you can download the EA....(or walk through all recent posts)
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?....
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.
Lol, trust me there have been lurkers on this forum for YEARS!