Hello
Is there a function to print the time scale in use? Scale time like 1 hours, 3 minutes, daily etc.
Martin
Function to print the Time Scale in use
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Function to print the Time Scale in use
do you mean the chart resolution?Hello
Is there a function to print the time scale in use? Scale time like 1 hours, 3 minutes, daily etc.
Martin
use the BarInterval keyword in conjunction with the BarType_ex keyword.
Re: Function to print the Time Scale in use
Thanks TJ.
AH! My English translator was not in the good section.
Martin
AH! My English translator was not in the good section.
I was looking in the S for scaleuse the BarInterval keyword in conjunction with the BarType_ex keyword.
Martin
Re: Function to print the Time Scale in use
Just in reference here is the code to get a string of the resolution Martin
Code: Select all
Var: Scale ("");
Scale = NumtoStr(Barinterval,0) + spaces(1);
Switch (bartype_ex) begin
Case = 1:
Scale = Scale + "Ticks";
Case = 2:
Scale = Scale +"Minutes";
Case = 3:
Scale = Scale + "Hours";
Case = 4:
Scale = Scale + "Days";
Case = 5:
Scale = Scale + "Weeks";
Case = 6:
Scale = Scale + "Months";
Case = 7:
Scale = Scale + "Years";
Case = 8:
Scale = Scale + "Volume";
Case = 9:
Scale = Scale + "Seconds";
Case = 10:
Scale = Scale + "Quarters";
Case = 11:
Scale = Scale + "Points";
Case = 12:
Scale = Scale + "Change";
Case = 13:
Scale = Scale + "Points";
default:
scale = scale + "Scale";
end;
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Function to print the Time Scale in use
wow... this is good !Just in reference here is the code to get a string of the resolution... Martin
Thanks for sharing.