老师帮我做一个简单的修改 新评论 yjyj1 2020.09.12 07:18 //+------------------------------------------------------------------+ //| i-BigBarsFromH1.mq4 | //| 疏?茹铕?? aka KimIV | //| http://www.kimiv.ru | //| 袜 鬣耦忸?沭圄桕?镱赅琨忄弪 疋鬻?耱囵?以 | //+------------------------------------------------------------------+ #property copyright "疏?茹铕?? aka KimIV" #property link "http://www.kimiv.ru" //---- #property indicator_chart_window //---- 马屮龛?镟疣戾蝠?--------------------------------------------- extern int TFBar =3; // 襄痂钿 耱囵?疋鬻尻 extern int NumberOfBar=50; // 暑腓麇耱忸 耱囵?疋鬻尻 extern int offsetHour =-2; // 鸯妁屙桢 鬣耦? extern color ColorUp =Red; // 肘弪 忸聃钿?疋鬻? extern color ColorDown=Green; // 肘弪 龛聃钿?疋鬻? //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ void init() { int i; for(i=0; i<NumberOfBar; i++) { ObjectDelete("BodyH"+TFBar+"Bar" + i); ObjectDelete("ShadowH"+TFBar+"Bar" + i); } for(i=0; i<NumberOfBar; i++) { ObjectCreate("BodyH"+TFBar+"Bar" + i, OBJ_RECTANGLE, 0, 0,0, 0,0); ObjectCreate("ShadowH"+TFBar+"Bar" + i, OBJ_TREND, 0, 0,0, 0,0); } Comment(""); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ void deinit() { // 愉嚯屙桢 钺牝钼 for(int i=0; i<NumberOfBar; i++) { ObjectDelete("BodyH"+TFBar+"Bar" + i); ObjectDelete("ShadowH"+TFBar+"Bar" + i); } Comment(""); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ void start() { int shb=0, sh1=1, d; double po, pc; // 皱睇 铗牮? ?玎牮? 耱囵?疋鬻尻 double ph=0, pl=500; // 皱睇 踵??腩?耱囵?疋鬻尻 datetime to, tc, ts; // 吗屐 铗牮?, 玎牮? ?蝈礤?耱囵?疋鬻尻 //---- if (Period()!=60) Comment("软滂赅蝾?i-BigBarsFromH1 镱滗屦骅忄弪 以 蝾朦觐 ?!"); else { if (MathMod(TFBar,2)==0) d=TFBar/2; else d=TFBar/2+1; pc=Close[0]; tc=Time[0]; // 铃骅?镱 耱囵?疋鬻赅? while(shb<NumberOfBar) { // 铃骅?镱 鬣耦恹?疋鬻赅? ph=MathMax(ph, High[sh1-1]); pl=MathMin(pl, Low[sh1-1]); ts=StrToTime(TimeToStr(Time[sh1-d], TIME_DATE)+" "+TimeHour(Time[sh1-d])+":30"); if (MathMod(TimeHour(Time[sh1])+1+offsetHour, TFBar)==0/* || TimeDay(Time[sh1])!=TimeDay(Time[sh1-1])*/) { po=Open[sh1-1]; to=Time[sh1-1]; ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_TIME1, to); ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_PRICE1, po); ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_TIME2, tc); ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_PRICE2, pc); ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_STYLE, STYLE_SOLID); ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_BACK, True); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_TIME1, ts); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_PRICE1, ph); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_TIME2, ts); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_PRICE2, pl); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_STYLE, STYLE_SOLID); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_WIDTH, 3); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_BACK, True); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_RAY, False); if (po<pc) { ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_COLOR, ColorUp); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_COLOR, ColorUp); } else { ObjectSet("BodyH"+TFBar+"Bar"+shb, OBJPROP_COLOR, ColorDown); ObjectSet("ShadowH"+TFBar+"Bar"+shb, OBJPROP_COLOR, ColorDown); } pc=Close[sh1]; tc=Time[sh1]; ph=0; pl=500; ph=MathMax(ph, High[sh1]); pl=MathMin(pl, Low[sh1]); shb++; } sh1++; } } } //+------------------------------------------------------------------+ 上面的是小时 k线 图上叠加三个小时的k线的指标,请教把小时图改成分钟图,比如 一分钟 k线 图上叠加3分钟的k线,谢谢! Автоматизация торговли на финансовых рынках - ??????? www.kimiv.ru ?????????? ? ???????? ??? ??????? ????? ???????? e-Reverser... Indicator issues with highlighting a certain time frame...EX: start 22:00 end 02:00 Useful features from KimIV 水平线 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
//+------------------------------------------------------------------+
上面的是小时 k线 图上叠加三个小时的k线的指标,请教把小时图改成分钟图,比如 一分钟 k线 图上叠加3分钟的k线,谢谢!