Problem with Time[ 0 ] - it is constant !
Format your code, please.
I think it is giving you a rising line. Look more closely.
Thanks Phy,
I think, you are right.
The line is rising !
I wrote an indicator and an EA and saw differences in the time.
Also the first 100 bars were different.
I still don't understand everything about MT4 !
But I'll see ...
Thanks a lot
Ulrich
Hello,
A survey is conducted in the context of the evolution of Expert Advisors.
Less than 2 minutes are needed to complete the form.
You will be automatically registered in a draw for an iPhone 16GB.
The results may be published on MorningNews.com & FinancialTimes.com
To participate: http://expertadvisor.questionform.com/public/Expert-Advisor
Hello Forum,
Working with Time[ 0 ] I get a constant number.
I would like to have the begin time of a bar !
Please, why does the attached indicator show me a constant number (horizontal line) ?
How to get a time based rising line ?
Thanks a lot
Ulrich
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
double buffer[];
int init()
{ IndicatorShortName( "Time" );
IndicatorBuffers( 1 );
SetIndexBuffer( 0, buffer );
SetIndexShift( 0, 0 );
SetIndexStyle( 0, DRAW_LINE );
SetIndexDrawBegin( 0, 0 );
return( 0 );
}
int start()
{ buffer[ 0 ]=Time[ 0 ];
return( 0 );
}