Script to build a synthetic pair for mt4?

 

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.   

 

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.

 
deadbouncecat:

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.   

Your target is triangular arbitrage?

Many strategies based on triangular arbitrage.

Friendly advice: It wastes your time!

 
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.  
 
Xiangdong Guo:

Your target is triangular arbitrage?

Many strategies based on triangular arbitrage.

Friendly advice: It wastes your time!

No this isn't a arb not.  I'll be using this manually.  
 
Xiangdong Guo:

Your target is triangular arbitrage?

Many strategies based on triangular arbitrage.

Friendly advice: It wastes your time!

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

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.  

you can use MX Graph for free at https://www.draw.io/

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
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...
 
Marco vd Heijden:

you can use MX Graph for free at https://www.draw.io/

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. 

 

 

 

 

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

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

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

 
deadbouncecat:

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. 

Yes it does make sense but requires manual input the way you wrote it.

If you want to have it fully automated then you must either have it sense new positions or open new position previously before applying the calculation.

So the question is do you want it to trade on it's own, or do you want it to be of assistance only?

Reason: