I decided to make such an experiment: starting from 2012.01.01 on USDJPY M15 conduct optimization for half a year and trade with the best optimization result for half a year. Then optimize and trade again
permission/denial to receive data indicators (Commodity Channel Index, CCI) from a zero bar
Reverse Level CCI(100) (absolute values from 0 to 150)
CCI(100) level above which the "Reverse" signal is generated - closing the current positions and allowing to open opposite positions
Global Signal Level CCI(100) (absolute values from 0 to 150)
CCI(100) level, above which a signal to open a position is generated
Minimum distance from the price to stop loss (in pips)
Minimum distance between Stop Loss (indicator (Moving Average, MA) and the current price
Trailing Step (in pips)
trailing step
Coefficient of protection Profit
calculated as Equity/Balance - if this coefficient is exceeded, we close all positions, therefore taking profit.
magic number
magic number
Also we have changed the logics for scale in: for example to open a Buy position we are not looking for the LOWEST position, we just check the opening price of the OLDEST position in the same direction. If this CURRENT POSITION has an opening price lower than the current Ask price, in which case we do not want to fill the BUY position.
And, as always, recommendations: optimize in tick generation mode "OHLC", and perform single passes in "All ticks" or "Every tick based on real ticks".
Here is an idea: I want to run genetics on many symbols and many timeframes (optimally from M5 up to and including H4). Then post the results of genetics here (how to save the test results: after genetics in the tab "Optimization" right click and "Export to XML").
Vladimir Karputov: I have the opposite: now there is no connection in the stock exchange. It's like in the song: You're a sailor I'm a sailor, You're a fisherman I'm a fisherman You on land I'm on sea We will not meet at all.
Added: Stock trading is netting and my EA is only for hedging (as indicated by the error printout when trying to connect to a stock account:
). Therefore, the exchange is flying by with a whistle of plywood on Paris.
You're wrong about the plywood over Paris. I've looked, your code is quite acceptable for exchange trading, at least on FORTS. I ran it in the strategy tester on @Si Splice M15 instrument from 2013 to 2017, and the result is given below. Since you do not hold opposite positions at the same time (the EA trades in Stop And Reverse mode), I suspect that the EA will also work in the stock market, just can't check it now.
Eugene Myzrov: But you're wrong - about the plywood over Paris! I looked, your code is quite acceptable for trading on the exchange, at least on the FORTS market. I ran it in the strategy tester on @Si Splice M15 instrument from 2013-2017, and the result is given below. Since you do not hold opposite positions simultaneously (EA trades in Stop And Reverse mode), then I suspect that the EA will also work on the stock market, I just can't check it now.
Put parameter "Use averaging" == false and the Expert Advisor "Ivan" will not add a position.
Although... Even if it adds a position, it will still (when the signal is reversed) close completely. You may try it.
Vladimir Karputov: Set "Use averaging" == false and the Expert Advisor "Ivan" will not add a position. Although... Even if it adds a position, it will (in case of a reversed signal) close it in full. You may try it.
So let him add a position, as long as the EA closes the position in one direction first, before it opens in the opposite direction.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I decided to make such an experiment: starting from 2012.01.01 on USDJPY M15 conduct optimization for half a year and trade with the best optimization result for half a year. Then optimize and trade again
Optimization parameter: "Balance + max Sharp Ratio". Mode of ticks generation: "OHLC".
Next it will be ...
version "1.008".
Input parameters:
Also we have changed the logics for scale in: for example to open a Buy position we are not looking for the LOWEST position, we just check the opening price of the OLDEST position in the same direction. If this CURRENT POSITION has an opening price lower than the current Ask price, in which case we do not want to fill the BUY position.
And, as always, recommendations: optimize in tick generation mode "OHLC", and perform single passes in "All ticks" or "Every tick based on real ticks".
Here is an idea: I want to run genetics on many symbols and many timeframes (optimally from M5 up to and including H4). Then post the results of genetics here (how to save the test results: after genetics in the tab "Optimization" right click and "Export to XML").
Source data:
MetaQuotes-Demo server.
Parameters to be optimized:
Run on such symbols (character set "forex.all"):
Symbol
Periods
User
EURUSD
M5, M10
Vladimir Karputov
GBPUSD
USDCHF
USDJPY
USDCAD
AUDUSD
AUDNZD
AUDCAD
M5
Vladimir Karputov
AUDCHF
AUDJPY
CHFJPY
EURGBP
EURAUD
EURCHF
EURJPY
EURNZD
EURCAD
GBPCHF
GBPJPY
CADCHF
need help - I can't do that many tests on my own. The prerequisite is that the genetics test must pass FULLY - until it stops completely.
Ivan 1.008 EURUSD M5:
Single pass with the best result (Every tick based on real ticks mode):
As you can see, the main profit is made on good one-way movements.
Ivan 1.008 EURUSD M10:
Single pass with the best result (Every tick based on real ticks mode):
Seems to me - unsuccessful parameters - profit only at the expense of ONE good share.
version "1.009".
When a position cannot be opened ( minimum Stop Loss condition is not met) the message is now more informative - prices have been added to it:
You're a sailor I'm a sailor,
You're a fisherman I'm a fisherman
You on land I'm on sea
We will not meet at all.
Added: Stock trading is netting and my EA is only for hedging (as indicated by the error printout when trying to connect to a stock account:
). Therefore, the exchange is flying by with a whistle of plywood on Paris.
But you're wrong - about the plywood over Paris! I looked, your code is quite acceptable for trading on the exchange, at least on the FORTS market. I ran it in the strategy tester on @Si Splice M15 instrument from 2013-2017, and the result is given below. Since you do not hold opposite positions simultaneously (EA trades in Stop And Reverse mode), then I suspect that the EA will also work on the stock market, I just can't check it now.
Put parameter "Use averaging" == false and the Expert Advisor "Ivan" will not add a position.
Although... Even if it adds a position, it will still (when the signal is reversed) close completely. You may try it.
So let him add a position, as long as the EA closes the position in one direction first, before it opens in the opposite direction.