论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1944回复:7
hilow
注册时间2004-09-25
MT人工智能之四(BB突破系统)
楼主发表于:2004-09-26 18:42只看该作者倒序浏览
1楼 电梯直达
电梯直达
突破交易例子 /*[[ Name := Bollinger Breakout Author := Lior Nabat Lots := 1.00 Stop Loss := 50 Take Profit := 90 Trailing Stop := 50 Update on every tick:= Yes ]]*/ /* HI, This Expert use 3 rules: 1. Breakout of Bollinger and reversal 2. Waiting for crossing the 62 EMA 3. Enough space between the 200 SMA ( that sometimes act as support and resistance Use only in EUR/USD and USD and CHF 15 min, not optimize yet. gives very good results, you can increase the lots and gain more profit. it will be great to get feedback on my Email: [email protected] lior, BTW, currently the trailing stop is not working... */ vars: Slippage(2)&#59; defines: EMA(62),ShortFlag(0),LongFlag(0)&#59; vars: sl(0),tp(0),p(0),q(0),s(0),mode(0),HighBar(0),LowBar(0),OpenBar(0),CloseBar(0),Shift(0),cnt(0)&#59; If Bars<100 or TakeProfit<10 then Exit&#59; If IsIndirect(Symbol)=TRUE then Exit&#59; p=1.0*iATR(3,1)&#59; //p=TrailingStop*Point&#59;BUY q=1.0*iATR(3,1)&#59; //q=TrailingStop*Point&#59; s=1.0*Point&#59; If CurTime-LastTradeTime>60 and TotalTrades<1 then { if open[Shift+1]<close[Shift+1] and open[Shift]>close[Shift] then if Close[shift+1]> iBANDS(21,2,MODE_HIGH,Shift+1) then // Checking the breakout and the reversal { ShortFlag=1&#59; LongFlag=0&#59; } if ShortFlag and bid<= iMA(EMA,MODE_EMA,shift) and (close[shift] - iMA(200,MODE_SMA,Shift) > (15*point)) then { SetOrder(OP_SELL,Lots,bid,Slippage,Bid+StopLoss*Point,Bid-TakeProfit*Point,Red)&#59; Alert ("Sell Short at: ",Bid,"S/L:",Bid+StopLoss*Point,"T/P: ",Bid-TakeProfit*Point)&#59; ShortFlag=0&#59; Exit&#59; }&#59; // checking the cross ... //LONG TRADES ENTRY CRITERIA if open[Shift+1]>close[Shift+1] and open[Shift]<close[Shift] then if Close[shift+1]<iBANDS(21,2,MODE_LOW,Shift+1) then { ShortFlag=0&#59; LongFlag=1&#59; } if LongFlag and ask >= iMA(EMA,MODE_EMA,shift) and (iMA(200,MODE_SMA,Shift) - open[shift]> (15*point)) then { SetOrder(OP_BUY,Lots,Ask,Slippage,Ask-StopLoss*Point,Ask+TakeProfit*Point,Blue)&#59; Alert ("Buy Long at: ",Ask,"S/L:",Ask-StopLoss*Point,"T/P: ",Ask+TakeProfit*Point)&#59; LongFlag=0&#59; Exit&#59; }&#59; }&#59; if TrailingStop<5 then { print("Invalid trailing stop")&#59; Exit&#59; }&#59; /* 橡钼屦屐 疣礤?铗牮?? 镱玷鲨? 茵彘腓磴 耱铒 疣犷蜞弪 麇疱?祛滂翳赅鲨?Stop Loss. */ for cnt=1 to TotalTrades begin /* ??潆桧磬 镱玷鲨? */ If Ord(cnt,VAL_TYPE)=OP_BUY then /* 潆桧磬 镱玷鲨 */ { /* 耥圜嚯?镳钼屦桁 - 羼螯 腓 镳铘栩 ??铋 皲咫觇 犷朦? 麇? 箴钼屙?蝠彘腓磴 耱铒? 镳钼屦屐 Bid, 蜞?赅?镱玷鲨 BUY */ If (Bid-Ord(cnt,VAL_OPENPRICE))>(TrailingStop*Point) then { /* 溧, 镱玷鲨 桁邋?镳栳??犷朦? 麇?珥圜屙桢 蝠彘腓磴 耱铒? (磬镳桁屦 30 矬黻蝾?. 蝈镥瘘 磬漕 镳钼屦栩? 祛骓?腓 镱耱噔栩?耱铒 塍鼬?麇?铐 猁?疣礤? */ If Ord(cnt,VAL_STOPLOSS)<(Bid-TrailingStop*Point) then { /* 戾?屐 耱铒腩耨 磬 箴钼屙?Bid-Trailing Stop */ ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE), Bid-TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red)&#59; Exit&#59; /* 溴腩 皲咫嚯?- 恹躅滂? */ }&#59; }&#59; }&#59; /* ??觐痤蜿? 镱玷鲨? */ If Ord(cnt,VAL_TYPE)=OP_SELL then { /* 耥圜嚯?镳钼屦桁 - 羼螯 腓 镳铘栩 ??铋 皲咫觇 犷朦? 麇? 箴钼屙?蝠彘腓磴 耱铒? 镳钼屦屐 Ask, 蜞?赅?镱玷鲨 SELL */ If (Ord(cnt,VAL_OPENPRICE)-Ask)>(TrailingStop*Point) then { /* 溧, 镱玷鲨 桁邋?镳栳??犷朦? 麇?珥圜屙桢 蝠彘腓磴 耱铒? (磬镳桁屦 30 矬黻蝾?. 蝈镥瘘 磬漕 镳钼屦栩? 祛骓?腓 镱耱噔栩?耱铒 塍鼬?麇?铐 猁?疣礤? */ If Ord(cnt,VAL_STOPLOSS)>(Ask+TrailingStop*Point) or Ord(cnt,VAL_STOPLOSS)=0 then /* 钺玎蝈朦眍?篑腩忤?!! */ { /* 戾?屐 耱铒腩耨 磬 箴钼屙?Ask+Trailing Stop */ ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE), Ask+TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red)&#59; Exit&#59; }&#59; }&#59; }&#59; end&#59; [此帖子已被 hilow 在 2004-9-30 12:51:45 编辑过]
TK29帖子1楼右侧xm竖版广告90-240
个性签名

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
~see~
注册时间2004-09-23
发表于:2004-09-29 08:03只看该作者
2楼
***if TrailingStop<5 then { print("Invalid trailing stop")&#59; Exit&#59; }&#59; /* 橡钼屦屐 疣礤?铗牮?? 镱玷鲨? 茵彘腓磴 耱铒 疣犷蜞弪 麇疱?祛滂翳赅鲨?Stop Loss. */ for cnt=1 to TotalTrades begin /* ??潆桧磬 镱玷鲨? */ If Ord(cnt,VAL_TYPE)=OP_BUY then /* 潆桧磬 镱玷鲨 */ { /* 耥圜嚯?镳钼屦桁 - 羼螯 腓 镳铘栩 ??铋 皲咫觇 犷朦? 麇? 箴钼屙?蝠彘腓磴 耱铒? 镳钼屦屐 Bid, 蜞?赅?镱玷鲨 BUY */ If (Bid-Ord(cnt,VAL_OPENPRICE))>(TrailingStop*Point) then { /* 溧, 镱玷鲨 桁邋?镳栳??犷朦? 麇?珥圜屙桢 蝠彘腓磴 耱铒? (磬镳桁屦 30 矬黻蝾?. 蝈镥瘘 磬漕 镳钼屦栩? 祛骓?腓 镱耱噔栩?耱铒 塍鼬?麇?铐 猁?疣礤? */ If Ord(cnt,VAL_STOPLOSS)<(Bid-TrailingStop*Point) then { /* 戾?屐 耱铒腩耨 磬 箴钼屙?Bid-Trailing Stop */ ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE), Bid-TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red)&#59; Exit&#59; /* 溴腩 皲咫嚯?- 恹躅滂? */ }&#59; }&#59; }&#59; /* ??觐痤蜿? 镱玷鲨? */ If Ord(cnt,VAL_TYPE)=OP_SELL then { /* 耥圜嚯?镳钼屦桁 - 羼螯 腓 镳铘栩 ??铋 皲咫觇 犷朦? 麇? 箴钼屙?蝠彘腓磴 耱铒? 镳钼屦屐 Ask, 蜞?赅?镱玷鲨 SELL */ If (Ord(cnt,VAL_OPENPRICE)-Ask)>(TrailingStop*Point) then { /* 溧, 镱玷鲨 桁邋?镳栳??犷朦? 麇?珥圜屙桢 蝠彘腓磴 耱铒? (磬镳桁屦 30 矬黻蝾?. 蝈镥瘘 磬漕 镳钼屦栩? 祛骓?腓 镱耱噔栩?耱铒 塍鼬?麇?铐 猁?疣礤? */ If Ord(cnt,VAL_STOPLOSS)>(Ask+TrailingStop*Point) or Ord(cnt,VAL_STOPLOSS)=0 then /* 钺玎蝈朦眍?篑腩忤?!! */ { /* 戾?屐 耱铒腩耨 磬 箴钼屙?Ask+Trailing Stop */ ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE), Ask+TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red)&#59; Exit&#59; }&#59; }&#59; }&#59; end&#59; 9*** [em19]
[em19] [em19] [em58]

han_wang
注册时间2004-07-18
幽默灌水奖
发表于:2004-10-09 00:46只看该作者
3楼
你发的这些系统我也有,一共有几十个,都试过了,不赔的只有两个,挣钱的一个也没有。
个性签名

俺就是传说中的‘喊王’!

麦可老狼
注册时间2004-08-09
发表于:2004-10-09 08:07只看该作者
4楼
[em58]
ljunfotex
注册时间2004-09-11
发表于:2004-10-15 05:52只看该作者
5楼
全是乱码,什么也看不见。
个性签名

轻风上云端

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
ahaibaobao
注册时间2017-11-18
ahaibaobao
注册时间2017-11-18

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]