Topics
Replies
matfx
25 Nov 2016, 01:18
( Updated at: 21 Dec 2023, 09:20 )
Daily Open Line
Hi mat,
I'm also new to CAlgo and also at the same time trying to convert the mql4 version of daily open line for Ctrader.
But in return same as you, can't get the actual working version for Ctrader. Nontheless i won't give up and so i would like to share here another code which is convert to mql5 code.
The mql5 version below :
#property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 #property indicator_label1 "Daily open line" #property indicator_type1 DRAW_ARROW #property indicator_style1 STYLE_DOT #property indicator_color1 clrGray input int TimeShift = 0; // Time shift (in hours) double openLine[]; // // // // // int OnInit() { SetIndexBuffer(0,openLine,INDICATOR_DATA); return(0); } int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { if (Bars(_Symbol,_Period)<rates_total) return(-1); for (int i=(int)MathMax(prev_calculated-1,0); i<rates_total && !IsStopped(); i++) { string stime = TimeToString(time[i]+TimeShift*3600,TIME_DATE); openLine[i] = (i>0) ? (TimeToString(time[i-1]+TimeShift*3600,TIME_DATE)==stime) ? openLine[i-1] : open[i] : open[i]; } return(rates_total); }
The mql5 version of Daily Open Line work as the same as the old MT4 version.
So i'm very hopeful someone can help how to convert it to C# language.
Thanks.
matfx
@matfx
matfx
08 Nov 2013, 07:26
Harmonics Pattern Indicator
Will be nice if some good coders can program such indicator. Currently harmonics pattern indicator works greatly on MT4 using ZUP. The indicator should identify gartley, butterfly, AB=CD, bat and crab pattern. Really appreciate if someone can do it.
@matfx
matfx
17 Jun 2013, 10:24
Successful installed dotnet 4.0 using wine. Install ctrader only half way through and came out error message.
Picture attached.
I do hope ctrader developers can come up something for linux users, i mean write another application that specify target for mac and linux users.
@matfx
matfx
08 Feb 2023, 04:00
this strategy not available. Just for info.
@matfx