This tool monitors MT4 and its traders buy/sell exposure and open trades in LMAX.
Chocolatey package: http://nuget.cplugin.com/feeds/apps/CPlugin.CopyTrade.SentimentStrategy.LMAX/versions
Strategy start at StartTime clock to count buy and sell trades from monitored pairs.
Calculate the Ratio between buy and sell (for example 2 buy and 1 sell is 66,66 % Buy and 33,33 %sell).
After N orders are count and set in RatioIn the strategy can start open an trade.
If Ratio is better than RatioBuy than we can open an sell trade.
If Ratio is better than RatioSell sell than we can open an buy trade.
Strategy stops and close order if ratio goes under RatioOut.
Strategy stops at EndTime and close open trade.
Program create and maintain persistance.json file, please do not delete this file manually, it needs to keep state between restarts of application .
Program can trace current situation to CSV file, in CsvLogger section you can enable/disable this feature and adjust time span. After you enable this option program will save data to journal.csv file.
To enable/disable whole trading activity there is a parameter: ReadOnly. With this parameter set to true program will work as usual but actual trades will not go to LMAX. Good point to test your settings before you go to Live.
UseTimeRange - set true if program should care about StartTime and EndTime. if you set this value to 'false' program will count trades infinitely. To reset counters simple stop the program (press 'Q') and manually delete persistance.json file from application's folder.
There is a parameter CalculationMode with default value which is UsingClosedTrades.
With UsingClosedTrades mode it calculates closed trades as mentioned above.
With UsingOpenTrades mode it calculates open trades from very beginning. Working with this mode disables usage of TradeAfter parameter.
Important
Program load settings only once when it start, so close program before you are about to adjust its settings.
Settings file example #
{
"CsvLogger": {
"Enabled": true,
"Period": "00:00:05"
},
"ReadOnly": false,
"CalculationMode": "UsingOpenTrades",
"StartTime": "09:00:00",
"EndTime": "18:00:00",
"UseTimeRange": true,
"TradeAfter": 4,
"RatioIn": 0.75,
"RatioOut": 0.5,
"Monitor": [
"EURUSD",
"EURUSDc",
"EURUSD."
],
"Trade": "EUR/USD",
"Amount": 10.0,
"SLOffset": 0.00050,
"TPOffset": 0.00020,
"TraceEachTrade": true,
"TracePeriodically": false,
"TraceEvery": "00:01:00",
"MT4": {
"Address": "127.0.0.1:443",
"Login": 1,
"Password": "***"
},
"LMAX": {
"Url": "https://web-order.london-demo.lmax.com",
"IsLive": false,
"Login": "***",
"Password": "***",
"InstrumentsCsv": "LMAX-Instruments.csv"
}
}