论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1486回复:4
zcz1955
注册时间2004-03-25
关于mt
楼主发表于:2004-04-30 14:30只看该作者倒序浏览
1楼 电梯直达
电梯直达
下面这个指标为什么不会在图上显示呢,有哪位高手能给我看看吗谢谢了 /*[[ Name := hua Author := Copyright ?2003, MetaQuotes Software Corp. Link := http://www.metaquotes.ru/ Separate Window := Yes First Color := Blue First Draw Type := Line Use Second Data := Yes Second Color := Red Second Draw Type := Line ]]*/ Inputs : FastMAPeriod(6), SlowMAPeriod(10), SignalMAPeriod(2); Variables : shift(0), cnt(0), sum(0), loopbegin1(0), loopbegin2(0), first(True), prevbars(0); Variables : FastMA(0), SlowMA(0); Variables : loopbegin3(0), shift1(0), KK(0), DD(0); SetLoopCount(0); // initial checkings If FastMAPeriod ( 1 Or SlowMAPeriod ( 1 Or SignalMAPeriod ( 1 Then Exit; If FastMAPeriod >;= SlowMAPeriod Then Exit; // check for additional bars loading or total reloading If Bars ( prevbars Or Bars-prevbars>;1 Then first = True; prevbars = Bars; // loopbegin1 and loopbegin2 prevent couning of counted bars exclude current If first Then Begin loopbegin1 = Bars-SlowMAPeriod-1; If loopbegin1 ( 0 Then Exit; // not enough bars for counting loopbegin2 = Bars-SlowMAPeriod-SignalMAPeriod-2; If loopbegin2 ( 0 Then Exit; // not enough bars for counting loopbegin3 = Bars-SlowMAPeriod-SignalMAPeriod-2; If loopbegin3 ( 0 Then Exit; // not enough bars for counting first = False; // this block is to be evaluated once only End; // convergence-divergence loopbegin1 = loopbegin1+1; // current bar is to be recounted too For shift = loopbegin1 Downto 0 Begin FastMA = iMAEx(FastMAPeriod,MODE_EMA,0,(2*PRICE_CLOSE+PRICE_HIGH+PRICE_LOW+PRICE_OPEN)/5,shift); SlowMA = iMAEx(SlowMAPeriod,MODE_EMA,0,(2*PRICE_CLOSE+PRICE_HIGH+PRICE_LOW+PRICE_OPEN)/5,shift); SetIndexValue(shift,FastMA-SlowMA); loopbegin1 = loopbegin1-1; // prevent to previous bars recounting End; // signal line loopbegin2 = loopbegin2+1; // current bar is to be recounted too For shift = loopbegin2 Downto 0 Begin sum = 0; for cnt = 0 To SignalMAPeriod-1 Begin sum = sum + GetIndexValue(shift+cnt); End; SetIndexValue2(shift,sum/SignalMAPeriod); // SetIndexValue2(shift,sum/SignalMAPeriod); loopbegin2 = loopbegin2-1; // prevent to previous bars recounting End; /* //test loopbegin3 = loopbegin3+1; // current bar is to be recounted too For shift = loopbegin3 Downto 0 Begin KK = 0; DD = 0; KK = 2*(GetIndexValue(shift) - GetIndexValue2(shift))*3.8; DD = -2*(GetIndexValue(shift) - GetIndexValue2(shift))*3.8; SetIndexValue(shift,KK); SetIndexValue2(shift,DD); loopbegin3 = loopbegin3-1; // prevent to previous bars recounting End; */
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客外汇论坛TALKFOREX.COM

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
zcz1955
注册时间2004-03-25
小虎子
注册时间2004-01-12
发表于:2004-05-03 00:49只看该作者
3楼
/*[[ Name := hua Author := Copyright ?2003, MetaQuotes Software Corp. Link := http://www.metaquotes.ru/ Separate Window := Yes First Color := Blue First Draw Type := Line Use Second Data := Yes Second Color := Red Second Draw Type := Line ]]*/ Inputs : FastMAPeriod(6), SlowMAPeriod(10), SignalMAPeriod(2); Variables : shift(0), cnt(0), sum(0), loopbegin1(0), loopbegin2(0), first(True), prevbars(0); Variables : FastMA(0), SlowMA(0); Variables : loopbegin3(0), shift1(0), KK(0), DD(0); SetLoopCount(0); // initial checkings If FastMAPeriod<;1 Or SlowMAPeriod<;1 Or SignalMAPeriod<;1 Then Exit; If FastMAPeriod >;= SlowMAPeriod Then Exit; // check for additional bars loading or total reloading If Bars<;prevbars Or Bars-prevbars>;1 Then first = True; prevbars = Bars; // loopbegin1 and loopbegin2 prevent couning of counted bars exclude current If first Then Begin loopbegin1 = Bars-SlowMAPeriod-1; If loopbegin1<;0 Then Exit; // not enough bars for counting loopbegin2 = Bars-SlowMAPeriod-SignalMAPeriod-2; If loopbegin2<;0 Then Exit; // not enough bars for counting loopbegin3 = Bars-SlowMAPeriod-SignalMAPeriod-2; If loopbegin3<;0 Then Exit; // not enough bars for counting first = False; // this block is to be evaluated once only End; // convergence-divergence loopbegin1 = loopbegin1+1; // current bar is to be recounted too For shift = loopbegin1 Downto 0 Begin FastMA = iMAEx(FastMAPeriod,MODE_EMA,0,(2*PRICE_CLOSE+PRICE_HIGH+PRICE_LOW+PRICE_OPEN)/5,shift); SlowMA = iMAEx(SlowMAPeriod,MODE_EMA,0,(2*PRICE_CLOSE+PRICE_HIGH+PRICE_LOW+PRICE_OPEN)/5,shift); SetIndexValue(shift,FastMA-SlowMA); loopbegin1 = loopbegin1-1; // prevent to previous bars recounting End; // signal line loopbegin2 = loopbegin2+1; // current bar is to be recounted too For shift = loopbegin2 Downto 0 Begin sum = 0; for cnt = 0 To SignalMAPeriod-1 Begin sum = sum + GetIndexValue(shift+cnt); End; SetIndexValue2(shift,sum/SignalMAPeriod); // SetIndexValue2(shift,sum/SignalMAPeriod); loopbegin2 = loopbegin2-1; // prevent to previous bars recounting End; /* //test loopbegin3 = loopbegin3+1; // current bar is to be recounted too For shift = loopbegin3 Downto 0 Begin KK = 0; DD = 0; KK = 2*(GetIndexValue(shift) - GetIndexValue2(shift))*3.8; DD = -2*(GetIndexValue(shift) - GetIndexValue2(shift))*3.8; SetIndexValue(shift,KK); SetIndexValue2(shift,DD); loopbegin3 = loopbegin3-1; // prevent to previous bars recounting End; */
小虎子
注册时间2004-01-12
发表于:2004-05-03 00:52只看该作者
5楼
你成心捣乱呐?连校验都没通过就拿上来。 我没细看你想写的是什么东西,就是帮你校验了一下.
zcz1955
注册时间2004-03-25
楼主发表于:2004-05-03 01:26只看该作者
4楼
太谢谢你了啊:)这也是我一朋友写的,他说他用这指标结合布林线打GBP/USD15分钟图很有效果的可能是他那论坛里把尖括号都变成圆括号了:)

本站免责声明:

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

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

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

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

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

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