MetaTrader 5 Python User Group - how to use Python in Metatrader - page 62

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thank you for the tip. I've read the materials on your link. It's a bit complicated.
Good afternoon! How do I work with TRADE_ACTION_CLOSE_BY ??? or who and how closes all open positions?
https://www.mql5.com/en/forum/306742/page10#comment_15577952
https://www.mql5.com/en/forum/306742/page10#comment_15577952
Thanks for the example.
I have a similar script in MKL that closes all profitable positions first.
Can we do the same in your script?
Good luck
PS: You have done so. Saw.
And this script is for netting accounts?Thanks for the example.
In my MKL, a similar script first closes all the profitable positions.
Can you do the same in your script?
Good luck
PS: You have done so. Had seen.
And this script for netting accounts?I usually prioritize position closing based on risk (position size), but if you want close based on overall profit then then you just have to modify how you sort the symbols.
I usually prioritise position closing based on risk (position size), but if you want close based on overall profit then you just have to modify how you sort the symbols.
Thank you
BackTrader: https://github.com/backtrader/backtrader
PyAlgoTrade https://github.com/gbeced/pyalgotrade
Zipline https://github.com/quantopian/zipline
Ultra-Finance https://code.google.com/p/ultra-finance/
ProfitPy https://code.google.com/p/profitpy/
pybacktest https://github.com/ematvey/pybacktest
prophet https://github.com/Emsu/prophet
quant https://github.com/maihde/quant
AlephNull https://github.com/CarterBain/AlephNull
Trading with Python http://www.tradingwithpython.com/
visualize-wealth https://github.com/benjaminmgross/visualize-wealth
tia Toolkit for integration and analysis https://github.com/bpsmith/tia
QuantSoftware Toolkit http://wiki.quantsoftware.org/index.php?title=QuantSoftware_ToolKit
Pinkfish http://fja05680.github.io/pinkfish/
bt http://pmorissette.github.io/bt/index.html
PyThalesians https://github.com/thalesians/pythalesians
QSTrader https://github.com/mhallsmoore/qstrader/
QSForex https://github.com/mhallsmoore/qsforex
pysystemtrade https://github.com/robcarver17/pysystemtrade
QTPyLib https://github.com/ranaroussi/qtpylib
RQalpha https://github.com/ricequant/rqalpha
Can Python scripts be used for backtesting in the terminal?
No, they only work as scripts on the chart in a separate thread.
Can you add a feature so that the terminal passes the chart symbol and time-frame as command-line arguments when evoking a python script by dropping it on the chart? For example, you drop the python script on the EURUSD M15 chart and the command to evoke the script would be
python mt5_script.py EURUSD 15
So that we can know the symbol and timeframe from within the python script
Can you add a feature so that the terminal passes the chart symbol and time-frame as command-line arguments when evoking a python script by dropping it on the chart? For example, you drop the python script on the EURUSD M15 chart and the command to evoke the script would be
So that we can know the symbol and timeframe from within the python script
Will be available next beta version tonight:
import sys chart_symbol='unknown' chart_tf=1 if len(sys.argv) == 3: chart_symbol, chart_tf = sys.argv[1:3]; print("Hello world from", chart_symbol, chart_tf) >> Hello world from T.NYSE 15