Specification
Hello everyone, i need an Expert Advisor for my spread trading strategy using my own indicator.
First i need to add a little modify to my indicator (just an alert when to take the tp) (ALREADY DONE)
Then i need to realize my EA, i need it for both Metatrader 4 and Metatrader 5 platform (i need the mt5 to test it in multi cross and the mt4 to execute it on broker with mt4 only)
Detailed specification:
window indicator - when the blue line of the spread (value 1) size from the bottom to the top the green horizontal line (Value5) then open the two legs, in this case .... Buy and Sell of pepsicola of Coke. (entry must be the next candle after the line cross the band)
Tp you have to touch the spread (value1) in median dotted (value3). Entry may also be more than one ... in the case mentioned above in fact there are two entrances before going to tp (for a total of 4 open operations).
2° type of entry: entry when it is X points distance from bands (not expect close above the bands)
The sell is the opposite condition to buy
Size of entry
Entry size is expected to be made on entering with the same monetary value on two legs, so as to be balanced.
EXAMPLE: In the case shown above the value of Pepsi was about $ 99, the coke instead about 43, so the ratio in this case should be approximately 1 to 2 (99/43 = 2.30), in fact, if you notice in the window I scored 10 pepsi actions against 23 Coke shares.
So EA should contain a formula for calculating the value of the legs in order to enter in a "weighted". In this way, and it could be adapted to any market (equities, indices, commodities, forex, etc ...) so it can be work together indicies and stock (for example)
Options for EA
2° leg Symbol
Maximum number of entries (2 kind: max entry for the same day and max entry for more days ...the max entry for the same day must have another sub-option.... time delay (to avoid consecutive entry due to the lateralization of the spread))
Take profit money (under option to tp on the median) ....must work together? In the sense that, or closes at the touch of the median, or closes before if reaches a monetary amount. Take profit in point (From the entry of the blue line at X point from the entry - it's related to the button present on the graph... obviously if we are above the median line i press the sell button (so the ea open the sell of the graph, and the buy for the 2nd symbol...) .....the blue line will have a certain of valor... (0.7870 if you see right now the EURUSD/GBPUSD)
i set the TP on point at X point (10 for example) and when the blue line goes to 0.7860 (regarding the example above) the ea close all the leg opened
All the TP must work (as said) together with the TP on median and TP moneyand TP on point... the first reached... the first close)
Capital to be considered for the revenue (monetary or in percent of equity)
Multiplier to second inputs (the first makes based on the selected capital above, from the second onwards instead increases the size of entry based on the set multiplier)
sl money
Sl on the% of available capital
setting parameters for the indicator
Button on the chart, "begins the sequence long" - so it starts when we want
Button on the chart, "begins the short sequence" - so it starts when we want
Time filter (to tell the ea when to start any sequence if there are conditions, so as to cut the night ...)
.......
It is important that I can make the backtest on Multipairs! So i can find tf or more interesting settings.
INDICATOR will be provided to the choosed developer and it must be included inside the EA.
Please add the option to put the number of the real/demo account to work with!
PLEASE APPLY ONLY THE CODER WHO HAVE EXPERIENCE AND KNOW ABOUT PAIR TRADING (I already have a bad experience with other coder that just make me waste my time…!!! He told me yes and after leave me without explane why!!!)
Please read the follow site to clarification about pair trading à http://www.investopedia.com/university/guide-pairs-trading/pairs-trade-example.asp