Spread trading in Meta Trader - page 189

 

Hello all!

Thank you so much for your support!

Just had a couple of questions on the subject.

1. Which brokerage company besides B. is preferable? (If you have a good Expert Advisor for your Expert Advisor and would like to use it, please contact us directly.)

2. Can you share your EA for a multi tool test run (at least the template where you can insert the owl kernel with the criteria for opening/closing a position). I am not a programmer myself, I started to study mql4 to test my ideas on the history, I should understand how much grey hair on my neck it would cost me to write such an owl, I remember RID was doing it.

3. I saw somewhere in this thread, but how profitable to trade the tandem currency (spot) - its futures (or index of currency)?

Z.I. Where does the RID reside now?

 
leonid553:

Hello all. For "those who are awake"!

There is a good current entry in the commodity spread. At the opening of trading, in a few hours there is a reason to pay attention to the Brent oil - fuel oil spread(BRNF2-HOF2)! I have repeatedly pointed out that this spread in short-term trading is usually quite reliable!

At the beginning of the convergence of price lines in the bottom indicator window - a good short-term arbitrage entry SELL BRNF2 - BUY HOF2 = 1^1 at tf=M30 - the arrows showed:

(holding positions until the convergence (crossing) of price lines, or until the turquoise line of the spread reaches the lower limit of the channel - in the upper indicator window! Buying fuel oil is better to implement a limit order, to avoid losses on the asc-bid).


I about 7.00 MSc in the morning (as I woke up) entered this spread. And now witha"feeling of deep satisfaction"(s) I am seeing a small total profit on BRN-HO positions !

The price lines have not yet converged (crossed). But, since the spread line has already crossed the lower boundary of the channel (i.e., by and large, the forecast was correct!) - I am relieved of responsibility for further developments on this spread and am now thinking of closing positions.

Congratulations to all who took advantage of the recommendation and made a profit! The profit may not be big but it is the reliability of getting the profit that matters more than its (profit) value! Good luck to everyone!

 

And more.....

I am not left with the idea of spread trading in forex.

So can anyone find a set of currencies to create a synthetic that meets the conditions of spread trading?

As I understand it, spread trading between currency pairs and their crossover turned out to be not compliant or what?

 
BoSkH:

Hello all!

A couple of questions have arisen on the subject.

1. Which DC other than B. is preferable? (If i know something about it, i will try to place it on the Expert Advisor and use it as a source of income.)

If you are an expert advisor, you may use it for testing purposes (for example, you may use a template with owl kernel and criteria for opening/closing positions). I am not a programmer myself, I started to study mql4 to test my ideas on the history, I should understand how much grey hair on my neck it would cost me to write such an owl, I remember RID was doing it.

3. I saw somewhere in this thread, but how profitable to trade the tandem currency (spot) - its futures (or index of currency)?

Where does the RID now reside?

1. there are very few brokerage companies of that kind. In mt4 Grand Capital is actively starting to introduce various futures contracts. In 4 (E-Global TFG), Fibo seems to have some. But for now, mt4 B. - is clearly out of the competition.

2. EA is there, but very raw. MT4 does not support multicurrency testing, so we have to virtually simulate and "conduct" trades on the second instrument. It is very tedious programmatically and "physically". I will fix the code, clean it up, make it readable and send it to you in a few days.

3. The tandem of futures-spot clearly (in my opinion) has no prospects in mt4. The possible profits will exceed the losses on the asc-bid instruments. And positions in the market will have to be held (at least) for several weeks.

4. Reid (rid) has now moved away from short-term trading in mt4. He does not come here. He opened an account with a respectable western broker and trades strictly calendar commodity spreads there. Reliable, position and long term - holds positions for 1-3 months in the market. Enter spreads on multi-year seasonal trends (grains, livestock, soft), e.g. from 1 Jan entry into a long term piggyback spread until the end of March SELL HEJ2 - BUY HEK2/.

Such spreads are considered quite reliable and profits are coming in slowly but surely!

 

Thanks for the answers, I will wait for point 2.

I wonder what other TA methods would be effective for spread analysis apart from channel construction and bounce trading?

Since trading in perpetual flat is really cool, I can get a lot out of it.

Do you have a quote history on futures?

 

All I can say is that in the mt4 format for Broco clients (in my personal account), quotes are available for all futures contracts over the last few years (since their liquidity) that have been traded in mt4. Using a special small program, the history of any futures is transferred to mt4.

Don't take it as an advertisement. Maybe other brokerage companies have such options, - I don't know...

==================

On Friday late at night on TF=M30 there was an entry signal to buy the spread silver-gold, BUY SIF2 - SELL GCG2 =1^2.

The performance was very good today:

 
BoSkH:

Thanks for the answers, I'll wait on point 2.

?

Probably best to post the EA right here. Perhaps someone else will be willing to participate in its improvement.

To begin with, I want to upload the spread indicator that was written upon my request by a professional programmer from our forum.

On the chart, - the indicator drew the spread line - in the very bottom indicator window.

The default parameters I set for the spread of precious metals silver-gold (futures):

It is on this, the bottom indicator, - roughly, and will work "arbitrage" the advisor in the tester and online.

And we will set up the Expert Advisor using this indicator as well.

Files:
 
BoSkH:

Thanks for the answers, I'll wait on point 2.

?

There is a version of multicurrency EA for working in mt4 tester in the download. It works with opening prices and it's better to test it in the same mode!

Unfortunately, this version still displays the current results of trades and in points, so you can only test it on instruments with the same dimension. I.e. spreads "silver-gold", oil-gasoline, etc. can hardly be tested here.

It should be modified in such a way that total profit/loss of real and virtual trades is shown in the deposit currency. I am finishing this re-do now.

In the meantime, with this, the current version, you can test the Expert Advisor on Brent-Light Sweat spreads, bonds ZB-ZN=2^3, Dax-Futsi indexes (1:3) and the like, i.e. on instruments of the same dimension.

Let's take the petrol-oil spread as an example. XRBF2 - HOF2 = 1^1

They have the same dimension of 0.0001 (1pips = 4.2 dollars approximately)

Open the gasoline chart XRBF2, M15 and put the indicator from the previous post above.

post.

We see that the average XRB/HO spread over the last 21 bars is now 0.8662

Moreover, the channel width (between the red and yellow borders) is about 0.006

Thus, we set Delta_Deviation = 0.006/2=0.003 = Delta_Deviation in the PROPERTIES of the EA (and of course, the names of spread instruments to be analyzed)

I.e. if the current(blue) spread deviates from the average value of spread(thick turquoise line) downwards - and goes beyond the lower(yellow) boundary, then the Expert Advisor will generate a real purchase of gasoline XRBF2 and a virtual sale of fuel oil HOF2

If the current(blue) spread deviates from the average value of spread (thick turquoise line) upwards and exceeds the upper(red) boundary, the Expert Advisor will generate real sale of XRBF2 petrol and virtual purchase of HOF2 fuel oil

Closing of positions is implemented by a specified total profit/loss. This option can be disabled.

================

To be continued.

Files:
 
leonid553:

Here is a version of multicurrency Expert Advisor to work in the mt4 tester. It works with opening prices and is better to test it in the same mode!

Unfortunately, this version still displays the current trade results in pips, so it can only be tested on instruments with the same dimension. I.e. the "silver-gold" spread will hardly be able to be tested here.

We should re-do it in such a way that total profit/loss of real and virtual trades is shown in the deposit currency. I am completing this re-do now.

In the meantime, with this, the current version allows testing the Expert Advisor on Brent-Light Sweat spreads, bonds ZB-ZN=2^3, etc., i.e. on instruments of the same dimension.

Let's take the petrol-oil spread as an example. XRBF2 - HOF2 = 1^1

They have the same dimension of 0.0001 (1pips = 4.2 dollars approximately)

Open the gasoline chart XRBF2, M15 and put the indicator from the previous post above.

post.

We see that the average XRB/HO spread over the last 21 bars is now 0.8662

Moreover, the channel width (between the red and yellow borders) is about 0.006

Thus, we set Delta_Deviation = 0.006/2=0.003 = Delta_Deviation in the PROPERTIES of the EA (and of course, the names of spread instruments to be analyzed)

I.e. if the current(blue) spread deviates from the average value of spread(thick turquoise line) downwards - and goes beyond the lower (yellow) boundary, then the Expert Advisor will generate a real purchase of gasoline XRBF2 and a virtual sale of fuel oil HOF2

If the current(blue) spread deviates from the average value of spread (thick turquoise line) downwards and exceeds the lower (yellow) boundary, the Expert Advisor will generate real sale of XRBF2 petrol and virtual purchase of HOF2 fuel oil

To be continued.


Leonid, thank you for the most interesting, IMHO, information... My "Monkeys"...:-) are coming to their logical conclusion, as soon as I get them to a more/less acceptable result, I'll be sure to do some spread trading.

 

=============

It is clear that we have to run the Expert Advisor twice on this history. First of all, on the XRBF2 gasoline chart, and then on HOF2 fuel oil chart, and(attention!) - in the second run we should swap the names of instruments in the PROPERTIES of the Expert Advisor!

This is necessary, because the tester keeps in its report only the results of real (and not virtual) trades. And then, summing up the results of two runs, we get the real results of paired spread trades on the specified history.

So first we run the Expert Advisor on the XRBF2, M15 gasoline chart with the above parameters:

Note that the comment in the top corner of the chart shows (in pips) the profit/loss of both real and virtual current trades! And even their total value, - underlined in yellow:

The result of the first run (real gasoline trades)

========================================

Now, open the HOF2, M15 chart, swap the instrument names in the PROPERTIES of the EA

And again we run it on the same history section. This is the result of "synchronous oil run":

===============

Here are the reports on both instruments.

CONTINUATION

Files:
Reason: