• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

New EA SyForge - Yet Another Autotrading Python Script

Symphoenix

Active Member
Credit Hunter
Credits
0
Hi everyone :hi:

Here's another python 3 script. :party:

It's called SyForge and uses 1Forge (free plan) and OANDA (demo account) to spot micro imbalances every minutes between 28 forex pairs and to trade them.
1Forge is a very fast data provider. It offers a free 1000 requests/day plan.
Just replace the <TOKEN>, <ID> and <KEY> fields with yours in BOTH files with a text editor.
Then, install the dependancies using the pip3 install commands located at the beginning of each file.
Finally, you can start the algorithm by typing "python SyForge.py" in a command prompt from the directory of the script.

This script uses 2 asynchronous functions that are launched every minutes for the first one and every 15 min for the second. The first one is contained in SyForge.py and compare the differences in the direction vectors of the 28 pairs from 2 data feeds with a covariance score generated by the second function. This second funtion is contained in covar.py and computes the covariance for each pair combination possible and save it to a file later called by the algo. It's automatically driven by SyForge.py.

Enjoy !

:rock:
 

Attachments

:party::party::party: *** NEW VERSION *** :party::party::party:

I improved the errors handling section.

-------------------------------------------------------------------------------------------------

Tutorial

1- Install python3 -> https://www.python.org/ftp/python/3.7.2/python-3.7.2.exe
/!\ During the installation process, don't forget to tick the box "Add to PATH...".
Reboot.

2- When it's done, open a terminal window (command prompt) and install the dependencies using "pip3 install..." commands (pip3 is a packet manager to add libraries to the python environment).

3- Edit the "SyForge.py" and "covar.py" scripts with any text editor to replace the IDs, Tokens and Key values at the beginning of the code with yours. Save them.

4- Launch the script by typing "python SyForge_v1.2.py" from the directory of this file in a terminal window (you can navigate to this directory with some "cd" commands).

(5- You can stop the execution of the script with Ctrl+C.)
 

Attachments

Not yet but it's working nicely on demo ;)

SyForge_details.png
 

Attachments

  • SyForge_details.png
    SyForge_details.png
    38 KB · Views: 1,356
Last edited:
how much the slippage can affect to the strategy?
is the demo spreads the same like in real account?
 
how much the slippage can affect to the strategy?
is the demo spreads the same like in real account?
I'm asking these questions to myself...
I've implemented a spread filter that ejects pairs with a spread greater than 3.5 pips (by default, setting available at the beginning of SyForge.py).
A friend of mine uses OANDA's API for live trading and he told me that the slippage is inexistent most of the time.
We'll see !
:)
 
:party::party::party: *** NEW VERSION *** :party::party::party:

Very important update. I improved the script as I have some feedback on the strategy now...

I'm planning to develop an interface in the near future...

Cheers

:rock:
 

Attachments

ok, please tell us some results of your system

what is your plan using this in a real account?

thanks
 
can you please explain it a bit more detail? I know it's hard to explain in text but if possible please put the video.
 
I'm waiting for a little bit more data before speaking about the results.
Its logic is quiet simple : it's computing every 15 minutes a score for each pair telling what's the bias (up or down). Every minutes, a check is done between the quotes from OANDA (slow) and those of 1Forge (fast) and if it's moving opposite, a trade is opened using the bias to determine the direction.
I'm sorry but the video is not for now... Just google what you don't know ;)
 
I'm waiting for a little bit more data before speaking about the results.
Its logic is quiet simple : it's computing every 15 minutes a score for each pair telling what's the bias (up or down). Every minutes, a check is done between the quotes from OANDA (slow) and those of 1Forge (fast) and if it's moving opposite, a trade is opened using the bias to determine the direction.
I'm sorry but the video is not for now... Just google what you don't know ;)
Is like a latency arbitrage strategy? with a slow broker and a fast broker?
 
Back
Top