Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 12:27:05 +0000



Post From: [ACSIL]Tool Drawing Question

[2016-11-11 16:10:22]
User96015 - Posts: 55
Dear sir,
I' m building a custom Numbers Bars indicator,
currently I' m plotting various levels of price with Tool Structure(Rectangle Type),
but I have a problem.
For exemple I need to plot a Rectangle with the following properties:
Start Time = the beginning of the bar
End Time = half space between current bar and the next bar
I tried, but maybe Start/End time is dipendent to Bar' s Y Scale so
it' s not possible.
I tried in this way:

double time_1 = sc.BaseDateTimeIn[sc.Index - 1].GetTime();
double time_2 = sc.BaseDateTimeIn[sc.Index].GetTime();
double med_tim = (time_1 + time_2) / 2;
Tool.BeginDateTime = COMBINE_DATE_TIME(sc.BaseDateTimeIn[sc.Index].GetDate(), med_tim);
Tool.EndDateTime = sc.BaseDateTimeIn[sc.Index];
I tested operations with debug and they are correct.
What am I doing wrong?
Thx in advance.
Bye.