Login Page - Create Account

Support Board


Date/Time: Sat, 01 Feb 2025 01:51:04 +0000



How to get the current time frame in ACISIL?

View Count: 710

[2019-06-14 08:52:48]
User932967 - Posts: 18
I'm converting a program I developed in Metatrader 5, I need to know the current time frame, but I haven't found anything about it.
Place the part of MT5 code that I need to convert:
int p=_Period; //with the "_Period" function MT5 give me the current time frame integer value
switch(p)
{
case 1://M1
minuti_principale=0;
minuti_attesa=1;
break;
case 5://M5
minuti_principale=5;
minuti_attesa=2;
break;
case 15://M15
minuti_principale=15;
minuti_attesa=3;
break;
case 30://M30
minuti_principale=30;
minuti_attesa=5;
break;
case 16385://H1
minuti_principale=60;
minuti_attesa=6;
break;
case 16388://H4
minuti_principale=(60*4);
minuti_attesa=20;
break;
case 16408://D1
minuti_principale=(60*24);
minuti_attesa=45;
break;
default:
return(0);//forced exit
break;
}

Date Time Of Last Edit: 2019-06-14 08:53:25
[2019-06-14 18:21:53]
Sierra Chart Engineering - Posts: 104368
Refer to:
sc.GetBarPeriodParameters()
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account