Spread trading in Meta Trader - page 50

 

OK friends, I have written a simple indicator.

It calculates the relative increments of any 2 instruments and the spread between them. All gaps are filled by a very simple synchronisation by seconds.


The input parameters are: 2 instrument names, period and number of bars to draw.


PS: It's too simple, for sure, during testing you will get a lot of nuances... you should be ready for it :-)

Files:
 

For those "who can't sleep in the dead of night..."

Looks like some good entries in the tandem of YM(mini-Dow)+NQ(Nasdaq)

Lines have separated and Delta is pulling up to a local high!

Still to decide on lot sizes....


 

What are the buy/sell conditions?

When the delta exceeds a certain value, do we buy silver and sell gold in fixed lots or what?

If it is not a secret.

 

I don't think it's a good idea to stick to a specific, constant value. It would be much more reasonable to trace on the history (for example 200-300 bars on m15) the value of the average maximum "divergence".

And on it we should take our bearings.

And recalculate this r-stat. max. deviation at least once every 2-3 days.

 
so what are the opening conditions?
 

Who knows what the error is in calculating the equilibrium point value in the deposit currency of the two instruments? Let's say the SP 500 and DJIA indicator get incorrect values?

my calculation is like this

Point value ( Instrument1 ) = Size of minimum instrument price change in the deposit currency / ( Minimum instrument price change step in the quote currency / Point size in the quote currency)

point value ("Instrument2") = Minimal change of the instrument price in the currency of deposit / ( Minimum step of the instrument price change in the quote currency / Point value in the quote currency)

next we look at the pip value of the instrument which is bigger, e.g. Instrument1

kof= pip value for Instrument1 / pip value for Instrument2

Tool1

Tool2*cof

 
forex-k писал(а) >>

Who knows what the error is in calculating the equilibrium point value in the deposit currency of the two instruments? let's say the SP 500 and DJIA indicator get incorrect values?

i can suggest the percentage change option,

The example is a bit off topic, but may be useful:

"Let me try again, on this triangle GBP-USD-JPY-GBP
Let's connect these three currencies (we get three pairs) with the formula
GBPUSD+USDJPY- GBPJPY = 0

.......

We already know that the amount of % change will vibrate around zero.... Now let's look how much does 1% change of each currency pair cost...
GBPUSD : 10.00*186=1860
USDJPY : 8,55*117= 1000
GBPJPY : 8,55*218=1864
first number - point value (for microlots it is in cents, but it doesn't matter, it's just a proportion which is important for these calculations)
second number - number of points for 1% change... (roughly - it's the first three digits of quotes ignoring the comma)... The result is obtained in cents per microlot when the pair changes by 1%
In practice you can take the quote itself, it will be more accurate, but with zeros after the comma or before it not to get confused...
Right? ..... our task is to minimize movement of equity, and since we know that 1% change of GBJPY will cause 1% change of USDJPY, (assume GBPUSD const ) and prices are different, so what? So USDJPY lots must be MORE....

.......
We determine the number of lots.... 1864 taken as a unit, we get
GBPUSD : 1864/1860 = 1.002
USDJPY : 1864/1000 = 1.864
GBPJPY : 1864/1864 = 1.000
Total......3,866
These are the proportions needed to split the deposit to open the whole depo with 100 leverage and the equity will swing around some amount with a smooth decline due to swaps..... i.e. the yield will vibrate around zero, but very quickly....

If the depo is 1000, then determine the number of microlots by pair
Total microlots - 100
GBPUSD : (100/3,866)*1,002 = 25.9
USDJPY : (100/3,866)*1,864= 48.2
GBPJPY : (100/3,866)*1,000 =25.86

So round it up, we get either

GBPUSD : buy 0.026
USDJPY : buy 0.048
GBPJPY : sell 0.026

or vice versa.....

This would be a position close to zero....."

 

Error found! Now everything fits! Both S&P 500-DJIA and EURO-US

previous versions with an error!


Files:
allvversii.rar  51 kb
 

Today is the first + teperby with the symbols to deal with, guys - if someone is not difficult write the symbols of futures, and I do not know how to signify the minidoujons and sp500, meat, etc. - where you can see a designation

000.
202302262010.01.23 00:22balance
5 000.00
202324522010.01.25 01:26buy1.00gcg01094.70.00.02010.01.25 12:591099.9-10.
000.00520.00
202324532010.01.25 01:27sell1.00sih017.0450.0000.0002010.01.25 12:5917.135-10.
000
.000.00-450.00
-20.000.000.0070.00
Closed P/L:

50.00

 
kaln82 >>:

Сегодня первый + тепербы с символами разобратся, ребята - если кому не сложно напишите символы фьючерсов, а то я незнаю как обозначаются минидоуджонс и сп500, мясо, и тд - где можно посмотреть обозначения

it's all there

Reason: