论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1556回复:12
tom
注册时间2004-01-10
在MT中显示分比
楼主发表于:2006-09-05 02:18只看该作者倒序浏览
1楼 电梯直达
电梯直达
MT只能显示M1,M5,M15,M30,..W1, 要是能显示分比,就更完美了,显示价格每一次跳动的曲线。 请问有哪位高手,可以把它搞出来?MT3,MT4都可以。
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客外汇论坛TALKFOREX.COM

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
tom
注册时间2004-01-10
楼主发表于:2006-09-05 02:28只看该作者
2楼
MT3的API接口支持分比数据接收,也就是说MT内部是支持分比数据接收的,可是我对API不懂,北京的外软通做了一个API接口,可以用飞狐,分析家接收MT的数据,但是要收费。
dqj8848
注册时间2003-12-03
发表于:2006-09-06 05:31只看该作者
3楼
不知你说的是不是这个!EUR.jpgEUR.jpg
trumanji
注册时间2006-01-30
发表于:2006-09-09 08:15只看该作者
4楼
楼主的想法很好 ,楼上的这个不好呀,MT里要是有个象招行2.0里的那个能够显示时时价格的图就好了.能够知道最高与最低价出现的具体时间.我现在两个一起看.很麻烦
老正
注册时间2003-09-21
365热心助人奖
发表于:2006-09-11 13:51只看该作者
5楼
说句实话.....这东东....其实.....不和股票一样..... 分笔的数据各个服务器都不一样 根本没法分析......
tom
注册时间2004-01-10
楼主发表于:2006-09-11 14:22只看该作者
6楼
老正大哥说的没错,谢谢 能否再帮我看看标题为“如何调用其它指标的参数 ” 看看能否实现
个性签名

韬客外汇论坛TALKFOREX.COM

tom
注册时间2004-01-10
楼主发表于:2006-09-11 15:34只看该作者
7楼
//+------------------------------------------------------------------+ //| FXTticksCollector.mq4 | //| Copyright ?2006, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright ?2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #include int ExtHandle=-1; string ExtFileName; int ExtBars; int ExtTicks; datetime ExtLastBarTime; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { ExtLastBarTime=0; ExtTicks=0; ExtBars=0; ExtFileName=Symbol()+Period()+"_0.fxt"; ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_READ); //---- if(ExtHandle<0) { //---- file does not exist WriteHeaderAndFirstBars(); if(ExtHandle<0) return; } else { if(!ReadAndCheckHeader(ExtHandle,Period(),ExtBars)) { //---- file is wrong FileClose(ExtHandle); WriteHeaderAndFirstBars(); } else { CheckWrittenBars(); //---- reopen file for write FileClose(ExtHandle); ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_READ|FILE_WRITE); FileSeek(ExtHandle,0,SEEK_END); //---- check for absentee bars after last run if(ExtLastBarTime0) { int period_seconds=Period()*60; int added=0; //---- add missing bars while(shift>0) { datetime open_time=Time[shift]; FileWriteInteger(ExtHandle, open_time, LONG_VALUE); FileWriteDouble(ExtHandle, Open[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, High[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume[shift], DOUBLE_VALUE); FileWriteInteger(ExtHandle, open_time+period_seconds-1, LONG_VALUE); FileWriteInteger(ExtHandle, 1, LONG_VALUE); shift--; added++; if(ExtLastBarTime0) { //---- store processed bars amount FileFlush(ExtHandle); FileSeek(ExtHandle,88,SEEK_SET); FileWriteInteger(ExtHandle,ExtBars,LONG_VALUE); //---- zeroize fields "for internal use" FileFlush(ExtHandle); FileSeek(ExtHandle,344,SEEK_SET); for(int i=0; i<64; i++) FileWriteInteger(ExtHandle,0,LONG_VALUE); //---- FileClose(ExtHandle); ExtHandle=0; Print(ExtTicks," ticks added. ",ExtBars," bars finalized in the header"); } //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- if(ExtHandle>0) WriteLastTick(); //---- return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void WriteHeaderAndFirstBars() { ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_WRITE); if(ExtHandle<0) return; //---- int start_bar=Bars; if(Bars>100) start_bar=100; WriteHeader(ExtHandle,Symbol(),Period(),start_bar); //---- first 100 bars as is int period_seconds=i_period*60; for(int i=start_bar; i>0; i--,ExtBars++) { datetime cur_open=Time; FileWriteInteger(ExtHandle, cur_open, LONG_VALUE); FileWriteDouble(ExtHandle, Open, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low, DOUBLE_VALUE); FileWriteDouble(ExtHandle, High, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume, DOUBLE_VALUE); //---- generated current time for bar state FileWriteInteger(ExtHandle, cur_open+period_seconds-1, LONG_VALUE); //---- flag 0 - testing is not evaluated FileWriteInteger(ExtHandle, 0, LONG_VALUE); } } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void CheckWrittenBars() { int bars_count=0; //---- ExtLastBarTime=0; FileSeek(ExtHandle,600,SEEK_SET); //---- while(!IsStopped()) { datetime open_time=FileReadInteger(ExtHandle, LONG_VALUE); if(FileIsEnding(ExtHandle)) break; //---- check for bar changing if(ExtLastBarTime!=open_time) { ExtLastBarTime=open_time; bars_count++; } //---- set position to next bar FileSeek(ExtHandle,48,SEEK_CUR); } //---- if(ExtBars!=bars_count) { Print("Wrong bars count ",ExtBars," in the FXT-header. Should be ",bars_count); ExtBars=bars_count; } //---- } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void WriteLastTick() { //---- check for bar changing if(ExtLastBarTime!=Time[0]) { ExtLastBarTime=Time[0]; ExtBars++; } //---- FileWriteInteger(ExtHandle, ExtLastBarTime, LONG_VALUE); FileWriteDouble(ExtHandle, Open[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, High[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume[0], DOUBLE_VALUE); FileWriteInteger(ExtHandle, CurTime(), LONG_VALUE); FileWriteInteger(ExtHandle, 4, LONG_VALUE); //---- ExtTicks++; } //+------------------------------------------------------------------+ [ 本帖最后由 老正 于 2006-9-14 15:56 编辑 ]
tom
注册时间2004-01-10
楼主发表于:2006-09-11 15:35只看该作者
8楼
//+------------------------------------------------------------------+ //| FXTticksCollector.mq4 | //| Copyright ?2006, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright ?2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #include int ExtHandle=-1; string ExtFileName; int ExtBars; int ExtTicks; datetime ExtLastBarTime; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { ExtLastBarTime=0; ExtTicks=0; ExtBars=0; ExtFileName=Symbol()+Period()+"_0.fxt"; ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_READ); //---- if(ExtHandle<0) { //---- file does not exist WriteHeaderAndFirstBars(); if(ExtHandle<0) return; } else { if(!ReadAndCheckHeader(ExtHandle,Period(),ExtBars)) { //---- file is wrong FileClose(ExtHandle); WriteHeaderAndFirstBars(); } else { CheckWrittenBars(); //---- reopen file for write FileClose(ExtHandle); ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_READ|FILE_WRITE); FileSeek(ExtHandle,0,SEEK_END); //---- check for absentee bars after last run if(ExtLastBarTime0) { int period_seconds=Period()*60; int added=0; //---- add missing bars while(shift>0) { datetime open_time=Time[shift]; FileWriteInteger(ExtHandle, open_time, LONG_VALUE); FileWriteDouble(ExtHandle, Open[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, High[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close[shift], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume[shift], DOUBLE_VALUE); FileWriteInteger(ExtHandle, open_time+period_seconds-1, LONG_VALUE); FileWriteInteger(ExtHandle, 1, LONG_VALUE); shift--; added++; if(ExtLastBarTime0) { //---- store processed bars amount FileFlush(ExtHandle); FileSeek(ExtHandle,88,SEEK_SET); FileWriteInteger(ExtHandle,ExtBars,LONG_VALUE); //---- zeroize fields "for internal use" FileFlush(ExtHandle); FileSeek(ExtHandle,344,SEEK_SET); for(int i=0; i<64; i++) FileWriteInteger(ExtHandle,0,LONG_VALUE); //---- FileClose(ExtHandle); ExtHandle=0; Print(ExtTicks," ticks added. ",ExtBars," bars finalized in the header"); } //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- if(ExtHandle>0) WriteLastTick(); //---- return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void WriteHeaderAndFirstBars() { ExtHandle=FileOpen(ExtFileName,FILE_BIN|FILE_WRITE); if(ExtHandle<0) return; //---- int start_bar=Bars; if(Bars>100) start_bar=100; WriteHeader(ExtHandle,Symbol(),Period(),start_bar); //---- first 100 bars as is int period_seconds=i_period*60; for(int i=start_bar; i>0; i--,ExtBars++) { datetime cur_open=Time; FileWriteInteger(ExtHandle, cur_open, LONG_VALUE); FileWriteDouble(ExtHandle, Open, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low, DOUBLE_VALUE); FileWriteDouble(ExtHandle, High, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close, DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume, DOUBLE_VALUE); //---- generated current time for bar state FileWriteInteger(ExtHandle, cur_open+period_seconds-1, LONG_VALUE); //---- flag 0 - testing is not evaluated FileWriteInteger(ExtHandle, 0, LONG_VALUE); } } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void CheckWrittenBars() { int bars_count=0; //---- ExtLastBarTime=0; FileSeek(ExtHandle,600,SEEK_SET); //---- while(!IsStopped()) { datetime open_time=FileReadInteger(ExtHandle, LONG_VALUE); if(FileIsEnding(ExtHandle)) break; //---- check for bar changing if(ExtLastBarTime!=open_time) { ExtLastBarTime=open_time; bars_count++; } //---- set position to next bar FileSeek(ExtHandle,48,SEEK_CUR); } //---- if(ExtBars!=bars_count) { Print("Wrong bars count ",ExtBars," in the FXT-header. Should be ",bars_count); ExtBars=bars_count; } //---- } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void WriteLastTick() { //---- check for bar changing if(ExtLastBarTime!=Time[0]) { ExtLastBarTime=Time[0]; ExtBars++; } //---- FileWriteInteger(ExtHandle, ExtLastBarTime, LONG_VALUE); FileWriteDouble(ExtHandle, Open[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Low[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, High[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Close[0], DOUBLE_VALUE); FileWriteDouble(ExtHandle, Volume[0], DOUBLE_VALUE); FileWriteInteger(ExtHandle, CurTime(), LONG_VALUE); FileWriteInteger(ExtHandle, 4, LONG_VALUE); //---- ExtTicks++; } //+------------------------------------------------------------------+ [ 本帖最后由 老正 于 2006-9-14 15:57 编辑 ]
个性签名

韬客外汇论坛TALKFOREX.COM

tom
注册时间2004-01-10
楼主发表于:2006-09-11 15:38只看该作者
9楼
Name: FXTticksCollector Author: stringo Downloaded: 495 Download: FXTticksCollector.mq4 (6.9 Kbytes) View The expert collects every incoming tick into the FXT file in realtime mode. The FXT file symbol and period correspond with the symbol and period of the chart the expert is attached to. The FXTHeader must be preliminarily downloaded from the Libraries section. -------------- (http://codebase.mql4.com/517)
tom
注册时间2004-01-10
楼主发表于:2006-09-11 16:13只看该作者
10楼
必须要支持FXT的软件打开,谁知道FXT软件是啥,怎么用,在哪里可以下?
tom
注册时间2004-01-10
楼主发表于:2006-09-13 18:40只看该作者
11楼
终于找到了,下面的代码可以在副窗口实时显示分笔的曲线,有谁能把它转换成MT3,因为MT3的速度比MT4快,而且数据质量好。 -------------------- //+------------------------------------------------------------------+ //| Ticks.mq4 | //| Copyright ? 2005, Yuri Makarov | //| http://mak.tradersmind.com | //+------------------------------------------------------------------+ #property copyright "Copyright ? 2005, Yuri Makarov" #property link "http://mak.tradersmind.com" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Green extern int Length = 300; extern int BarVolume = 1; double tick; double CumPrice = 0; int CurVol = 0; int IStart = 1; int init() { IndicatorShortName("Ticks"); SetIndexBuffer(0, tick); SetIndexStyle (0, DRAW_LINE); IStart = 1; } int start() { if (IStart == 1) { for (int i = 0; i < Bars; i++) tick = EMPTY_VALUE; IStart = 0; } CurVol++; CumPrice += Bid; if (CurVol >= BarVolume) { for (i = Length; i >= 0; i--) tick[i + 1] = tick; tick[0] = CumPrice / CurVol; CurVol = 0; CumPrice = 0; } } [ 本帖最后由 老正 于 2006-9-14 15:58 编辑 ]
老正
注册时间2003-09-21
365热心助人奖
发表于:2006-09-14 07:58只看该作者
12楼
谢谢....不过那个问题偶是不明白..... 偶这个版主晕指标 哈哈
tom
注册时间2004-01-10
楼主发表于:2006-09-22 12:36只看该作者
13楼
上面的指标运行时有“断档”,现更正如下: (老正大哥,我的问题已解决,谢谢~) //+------------------------------------------------------------------+ //| Ticks.mq4 | //| Copyright ? 2005, Yuri Makarov | //| http://mak.tradersmind.com | //+------------------------------------------------------------------+ #property copyright "Copyright ? 2005, Yuri Makarov" #property link "http://mak.tradersmind.com" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 White #property indicator_color2 Red extern int Length = 10000; extern int BarVolume = 1; double tick; double CumPrice = 0; int CurVol = 0; int IStart = 1; int init() { IndicatorShortName("Ticks"); SetIndexBuffer(0, tick); SetIndexStyle (0, DRAW_LINE); IStart = 1; return(0); } int start() { if (IStart == 1) { for (int i = 0; i < Bars; i++) tick = EMPTY_VALUE; IStart = 0; } CurVol++; CumPrice = Bid; if (CurVol >= BarVolume) { for (i = Length; i >= 0; i--) tick[i + 1] = tick; tick[0] = CumPrice; CurVol = 0; CumPrice = 0; if(tick[1]> 2000) { tick[1]=tick[2]; } } //------------------ return(0); }

本站免责声明:

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

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

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

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

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

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