顺水外汇EA交易网MT4

标题: 一个不错的采用神经网络的EA的示例(含作者程序源码) [打印本页]

作者: careearn    时间: 2018-1-11 00:57
标题: 一个不错的采用神经网络的EA的示例(含作者程序源码)
这里是作者的源码程序
游客,如果您要查看本帖隐藏内容请
作者: 309318761    时间: 2018-1-11 02:27
看不懂,那位熟悉遗传算法高人,请开课传授。谢谢!
作者: chengshiheng    时间: 2018-1-11 02:54
我id简单快点放假打开房间 丁克肯德基

作者: 浪漫K.K.K    时间: 2018-1-11 04:03
继续上帖
Stage 2. Teaching the perceptron responsible for short positions:
步骤 2 ,“教育负责管“开空仓”(short positions)的感知机
Set the value 2 (according to the stage number) for the input "pass".
根据步骤的步骤号,设置(input,参数变量) 的"pass"的值为 2。
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.
不测试那些已经测试过的优化了的以前步骤的inputs.(变量参数)。以防万一,保存以前步骤获得的inputs(变量参数值)到一个文件中去
Check the inputs for optimization according to our rule: their identifiers must end in 2:
根据我们的规则,必须是测试那些是在尾标为 2的inputs(变量参数)。
x12, x22, x32, x42 - weight numbers of the perceptron that recognizes short positions. It is optimized with the values within the range of 0 to 200, step 1
x12, x22, x32, x42 是识别并开空仓的感知机的权重,它们的值在step 1时被优化在范围0 to 200
tp2 - TakeProfit of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1
tp2  (TakeProfit) 是感知机所开的仓的止盈值,它们的值在step 1时被优化在范围10 to 100。
sl2 - StopLoss of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1
sl2 (StopLos) 在 step 1它是感知机所开的仓的止损值,被优化值的范围在 10 to 100
p2 - the period of the values of price difference to be analyzed by the perceptron. It is optimized with the values within the range of 3 to 100, step 1.
p2 感知机所分析的价格差的周期值 (iiCCI()函数的一个参数∶period - Averaging period for calculation),在step 1 它的值所优化的范围在3 to 100
Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below:
现在,开始用遗传算法来优化“教育”NN(让它“学习”市场),获得的结果如下∶
[attach]13847[/attach]
[attach]13848[/attach]

[ 本帖最后由 careearn 于 2008-6-27 14:42 编辑 ]
作者: careearn    时间: 2018-1-11 05:13

继续上贴
Stage 3. Teaching the perceptron responsible for long positions:
步骤 3 “教育”负责开多仓的感知机(“学习”市场)。
Set the value 3 (according to the stage number) for the input "pass".
设置值 3 (根据步骤的步骤号)说明这些input(变量参数)已经“通过”(the input "pass")
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.
同样,不测试,那些已经测试过的优化了的,以前步骤的inputs.(变量参数值),以防万一,保存以前步骤获得的inputs.(变量参数值) 到一个文件中去
Check the inputs for optimization according to our rule: their identifiers must end in 3:
根据我们的规则,优化测试的inputs(变量参数值)必须是尾标为3的那些变量参数。
x13, x23, x33, x43 - weight numbers of the perceptron that recognizes long positions. It is optimized with the values within the range of 0 to 200, step 1.
x13, x23, x33, x43是识别多仓的感知机的权重,它们的值在step 1时被优化时得到的范围在0 to 200
tp3 - TakeProfit of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1
tp 3  (TakeProfit) 是感知机所开的仓的“止盈值”,它的值在step 1时被优化时的范围是在10 to 100。
sl3 - StopLoss of positions opened by the perceptron. It is optimized with the values within the range of 10 to 100, step 1
sl3 (StopLoss) 是感知机所开的仓的“止盈值”,它们的值在step 1时被优化为范围是10 to 100。
p3 - the period of the values of price difference to be analyzed by the perceptron . It is optimized with the values within the range of 3 to 100, step 1.
p3 --感知机所分析的价差的周期值。它在步骤 1 优化时得到的值的范围是 3 to 100 。
Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below:
启动采用遗传算法的优化来“教育”NN,所获得的结果如下∶
[attach]13849[/attach]
[attach]13850[/attach]

作者: careearn    时间: 2018-1-11 05:41

继续上贴
Stage 4 (final). Teaching the first layer, i.e., teaching the perceptron that is in the upper layer:
步骤 4 (最终步骤) “教育”第一层,即“教育”在上层的感知机。
Set the value 4 (according to the stage number) for the input "pass".
根据步骤的步骤号,设置值4 为输入通过(for the input "pass")
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.
不测试那些在之前步骤已经测试过的优化了的“输入” (inputs) (意思是∶已经在之前步骤优化过的变量的参数值就不再优化它们了)。以防万一,将之前步骤获得的这些变量的参数值存到一个文件中去。
Check the inputs for optimization according to our rule: their identifiers must end in 4:
根据我们的规则,只测试优化标识符最后位是4的那些inputs(变量的参数值)
x14, x24, x34, x44 - weight numbers of the perceptron of the first layer. It is optimized with the values within the range of 0 to 200, step 1.
x14, x24, x34, x44 是第一层感知机参数的权重值。在步骤 1 时它们被优化的值的范围在0 io 200 。
p4 - the period of the values of price difference to be analyzed by the perceptron. It is optimized with the values within the range of 3 to 100, step 1.
p4 被感知机分析的价差的值的周期。在步骤 1 它的值的范围被优化在 3 to 100 。
Let's start teaching it using optimization with a genetic algorithm. The obtained results are given below:
采用遗传算法来优化,启动“教育”来教它“学习”。所获得结果如下∶
[attach]13851[/attach]
[attach]13852[/attach]

作者: careearn    时间: 2018-1-11 06:42

继续上贴
That's all, the neural network has been taught.
这就是全部,神经网络已经被“教育”了。
The ATS has one more non-optimizable input, mn - Magic Number. It is the identifier of positions for a trading system not to mix its orders with the orders opened manually or by other ATSes. The value of the magic number must be unique and not coincide with the magic numbers of positions that have not been opened by this specific Expert Advisor.
这个ATS有一个不能被优化的input(参数) mn-- Magic Number.(魔法号)它是一个交易系统它所开的仓位的识别符,为的是不和手动开仓或其他ATSes开的仓位混淆。这个Magic Number的值必须是唯一的并且和这个特别的ea尚未开仓的magic numbers不一致。
P.S.
The size of the initial deposit is found as the doubled absolute drawdown, i.e., we consider some safety resources for it.
出于保证有一些安全保险的考虑,初始保证金的金额设置是考虑为绝对最大回落的两倍
The EA given in the source codes is not optimized.
这个ea的源代码没有优化。
If you need to replace the built-in BTS with the algorithm of another trading system, you must modify the contents of the function basicTradingSystem().
如果你需要置换嵌入另一个交易系统算法的BTS,你必须修改BTS功能的内部。
In order not to enter the initial and the final values and the values of steps for optimization, you can take the ready file combo.set, place it in the folder \tester MT4, and upload to the EA's properties in Tester.
以便于不输入优化时的初值,终值和步长,你可采用已备好的combo.set文件,把它放置到MT4的 \tester 目录并加载这个ea的属性(properties)到Strategy Tester。
Re-optimization of the EA is to be performed at a weekend, i.e., on Saturday or on Sunday, but only if the results of the preceding week were unprofitable. The presence of losses means that the market has changed, and the re-optimization is necessary. The presence of profits means that the ATS does not need any re-optimization and recognizes market patterns quite well.
这个ea的再优化可在周末进行,即周六和周日,但仅在前面一周的结果是不盈利的。亏损的出现意味着市场已经改变,于是需要重新优化,若是仍然获利意味着这个ATS不需要重新优化,它对市场目前的模型的识别继续有效!
5 comments  
Subscribe to discussion
sstef wrote:
backtests seems ok, how about forward tests ?
Try independet without me. You all have for original forward and other tests: open source, tester, head and hands.
reply 08.03.2008 08:57 Reshetov

thanks a lot Reshetov,
very simple but very powerful, i have never think about this idea,
backtests seems ok, how about forward tests ?
reply 07.03.2008 23:42 sstef

tws0124 wrote:
What is the number of pass?
Try test for pass value of 1, 2, 3 and 4
What is best of the best, that use (right solution: pass = 4)
reply 07.03.2008 10:45 Reshetov

All the optimization is completed, now I use it by live account, What is the number of pass?
Sorry,bad English...
reply 07.03.2008 08:29 tws0124

This sources Сombo.mq4 is old version with error!!!!!
Right version is Сombo_Right.mq4. Download http://codebase.mql4.com/ru/2719
reply 06.03.2008 11:43 Reshetov

作者: careearn    时间: 2018-1-11 07:29
body,you got lot of fans there.
But AI has goes far beyond what you expected.
作者: limulimu    时间: 2018-1-11 07:58
Yes,can you give us more forward information about the status if AI now?
作者: bull    时间: 2018-1-11 09:26
thanks......
作者: fxtrader    时间: 2018-1-11 09:48
真是好东西,希望从中获取成功的方法!
作者: 老川    时间: 2018-1-11 10:34
神经网络系统,是靠模拟历史数据优化参数,调整权系数,采用阈值逻辑单元(Threshold Logic Unit,TLU)寻找临界阈值的方法,其核心是首先必须有一个经过参数优化的BTS系统,并由它通过若干个感知器,教会神经网络如何与你现有的系统“互补地”协调工作。
其中难度较大的是用遗传算法来优化“教育”神经网络,因为遗传算法还相当缺乏和困难.
学习Better的DD难度也在这里,MT4里的遗传算法如何与自己的BTS结合使用是关键所在。
---------这或许是EA成功突围的有效途径之一!顶一个!
那位熟悉遗传算法高人,请开课传授。谢谢!
作者: 一目    时间: 2018-1-11 11:56
是好东西,需要下载.
作者: cangeh    时间: 2018-1-11 12:35
神经网络, 好神秘啊.
作者: 曾戊庚    时间: 2018-1-11 12:54

[attach]13853[/attach]

[attach]13853[/attach]

[attach]13853[/attach]

[attach]13853[/attach]

[attach]13853[/attach]

[attach]13853[/attach]

[attach]13853[/attach]

作者: eliwang    时间: 2018-1-11 14:01
看不懂,那位熟悉遗传算法高人,请开课传授。谢谢!
作者: wwsmao    时间: 2018-1-11 14:47
222222222222222222




欢迎光临 顺水外汇EA交易网MT4 (http://waterforex.com/) Powered by Discuz! X3.2