# Script to build a synthetic pair for mt4?

38

Is there a order script that let's me build a synthetic pair?

e.g.-  I want to create a EURUSD synthetic using the JPY.  So it would place and order to long EURJPY and short USDJPY simultanesouly, as well as calculate the correct amount I need to take to stay dollar neutral.

Does anything like this exist?  Thanks in advance.

Moderator
6138

there are many ways to do this.

you can for example let the robot open two positions, or you can let the robot scan the open orders and automatically add the other order when you manually open up a position.

also you can add the dual profits and losses so you get the product of the two and plot is as comment on the chart.

then you can also make it close both order when a specific profit product is reached, or you can, once in profit close the losing position and let the winner run out..

so basically first you will have to choose and then describe the exact mechanism you want to use.

your are definitely thinking in a correct direction here.

i will be happy to help you if you construct a flow diagram.

4387

Is there a order script that let's me build a synthetic pair?

e.g.-  I want to create a EURUSD synthetic using the JPY.  So it would place and order to long EURJPY and short USDJPY simultanesouly, as well as calculate the correct amount I need to take to stay dollar neutral.

Does anything like this exist?  Thanks in advance.

Many strategies based on triangular arbitrage.

38

Marco vd Heijden:

there are many ways to do this.

you can for example let the robot open two positions, or you can let the robot scan the open orders and automatically add the other order when you manually open up a position.

also you can add the dual profits and losses so you get the product of the two and plot is as comment on the chart.

then you can also make it close both order when a specific profit product is reached, or you can, once in profit close the losing position and let the winner run out..

so basically first you will have to choose and then describe the exact mechanism you want to use.

your are definitely thinking in a correct direction here.

i will be happy to help you if you construct a flow diagram.

Wow, I didn't think of that many features.  I was looking for something that would save me the time it takes for me to calculate the correctly weighted amount to create the synthetics I want.

I'll attempt to throw together a flow chart.  I've never actually made one.
38

Xiangdong Guo:

Many strategies based on triangular arbitrage.

No this isn't a arb not.  I'll be using this manually.
6928

Xiangdong Guo:

Many strategies based on triangular arbitrage.

Triangular pair trading doesn't necessarily mean arb. It can actually be a very successful trading strategy.
Moderator
6138

Wow, I didn't think of that many features.  I was looking for something that would save me the time it takes for me to calculate the correctly weighted amount to create the synthetics I want.

I'll attempt to throw together a flow chart.  I've never actually made one.

here i made an example for you.

So you can make your own by removing and adding flow components this is very useful when designing and writing the final code blocks and modules.

draw.io - free flow chart maker and diagrams online
• www.draw.io
draw.io (formerly Diagramly) is free online diagram software. You can use it as a flowchart maker, network diagram software, to create UML online, as an ER diagram tool, to...
38

Marco vd Heijden:

here i made an example for you.

So you can make your own by removing and adding flow components this is very useful when designing and writing the final code blocks and modules.

This is probably pretty sloppy from a coders persepctive, but tell me if this makes any sense. Let me know if something doesn't make sense.

5583

https://www.mql5.com/en/code/909

The order Panel for MT4 will be on the Market soon.

Moderator
6138