You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I wrote a indicator , I can call my signal from indicator ;
thank you mladen for your time ,
Need Help, This is true or not ?, maybe iam wrong
Every n bar code is :
int current=0;
datetime BarTime=0;
if (BarTime < Time[0])
BarTime=Time[0];
Need Help, This is true or not ?, maybe iam wrong
Every n bar code is :
int current=0;
datetime BarTime=0;
if (BarTime < Time[0])
BarTime=Time[0];If you want to save the bar time between two ticks then use something like this instead :
static datetime BarTime=0;
if (BarTime < Time[0]) BarTime=Time[0];
But from you r post not sure what are you trying to achieve
If you want to save the bar time between two ticks then use something like this instead :
static datetime BarTime=0;
if (BarTime < Time[0]) BarTime=Time[0];
But from you r post not sure what are you trying to achieveThanks for fast reply Mladen,
I mean like this, I will get sound alert every 5 candle formed on D1 time frame, how i can code that,
thanks before
Thanks for fast reply Mladen,
I mean like this, I will get sound alert every 5 candle formed on D1 time frame, how i can code that,
thanks beforeSince trading week has more or less 5 day (exceptions that open on Sunday and have that 1 or 2 hour Sunday data can be ignored), why don't you simply do something like this :
//
// the following cod would work on each Friday
// change the day to desired one
//
//
if (TimeDayOfWeek(time[0]) == 5)
{
// your code here
}
Since trading week has more or less 5 day (exceptions that open on Sunday and have that 1 or 2 hour Sunday data can be ignored), why don't you simply do something like this :
//
// the following cod would work on each Friday
// change the day to desired one
//
//
if (TimeDayOfWeek(time[0]) == 5)
{
// your code here
}
Hehe... i forgot about TimeDayOfWeek, thanks Mladen for your help
Since trading week has more or less 5 day (exceptions that open on Sunday and have that 1 or 2 hour Sunday data can be ignored), why don't you simply do something like this :
//
// the following cod would work on each Friday
// change the day to desired one
//
//
if (TimeDayOfWeek(time[0]) == 5)
{
// your code here
}
If i code like this :
if (TimeDayOfMonth(time[0]) == 5)
The following code will work on each Fifth candle at D1 time frame, is that true Mladen ??
becouse i need my code work once every month on specific candle (Fifth candle every month on D1 time frame)
If i code like this :
if (TimeDayOfMonth(time[0]) == 5)
The following code will work on each Fifth candle at D1 time frame, is that true Mladen ??
becouse i need to work my code once every month on specific candleNo.
It will work on every Friday (to make it work on every fifth candle it would need a starting date from which the candles would be counted)
No. It will work on every Friday (to make it work on every fifth candle it would need a starting date from which the candles would be counted)
How about this one, i just thinking :
if ( Day() == 8 && Month() == 4 && Year() == 2013 )
This work on Fifth candle ( Like this day candle ),
and if i want to work on fifth candle next month, i just change the date, is that true Mladen ??
How about this one, i just thinking :
if ( Day() == 8 && Month() == 4 && Year() == 2013 )
This work on Fifth candle ( Like this day candle ),
and if i want to work on fifth candle next month, i just change the date, is that true Mladen ??That code will be executed on April 8th of 2013. If you want it to be executed on fixed dates, you can used that format