Hi,
I am not very proud of calling myself a techie after trying to get this for whole of yesterday. Any help is appreciated.
I am using this on intraday data. And set the range to 1 recent day
Objective: Want to run this at 10 am to find if the first half hour is a Full Green Candle or Full Black Candle.
Filter = DateNum() > 1140101;
_SECTION_BEGIN( "Open Drive1" );
TimeFrameSet( 2*in15Minute );
Lo = TimeFrameGetPrice( "L", 2*in15Minute, -1 );
Hi = TimeFrameGetPrice( "H", 2*in15Minute,-1 );
Ope = TimeFrameGetPrice( "0", 2*in15Minute,-1 );
Clo = TimeFrameGetPrice( "C", 2*in15Minute, -1 );
Buy = ( ( Clo > Ope ) AND ( ( Clo - Ope ) / ( .001 + Hi - Lo ) > .8 ) );
Sell = ( ( Ope > Clo ) AND ( ( Ope - Clo ) / ( .001 + Hi - Lo ) > .8 ) );
AddColumn( Ope, "Open" );
AddColumn( Clo, "Close");
AddColumn( Hi, "High");
AddColumn( lo, "Low");
TimeFrameRestore();
_SECTION_END();
The values which I am getting is all crap. For ex: For Apollo Tyres, following are values which it has printed. Looks like it is taking Daily Values
Open =107.85 (No idea where it came from)
Close =107.85 (30th Jan Close)
High= 108.3 (30th Jan High)
Low=104.5 (30th Jan Low)
I am not very proud of calling myself a techie after trying to get this for whole of yesterday. Any help is appreciated.
I am using this on intraday data. And set the range to 1 recent day
Objective: Want to run this at 10 am to find if the first half hour is a Full Green Candle or Full Black Candle.
Filter = DateNum() > 1140101;
_SECTION_BEGIN( "Open Drive1" );
TimeFrameSet( 2*in15Minute );
Lo = TimeFrameGetPrice( "L", 2*in15Minute, -1 );
Hi = TimeFrameGetPrice( "H", 2*in15Minute,-1 );
Ope = TimeFrameGetPrice( "0", 2*in15Minute,-1 );
Clo = TimeFrameGetPrice( "C", 2*in15Minute, -1 );
Buy = ( ( Clo > Ope ) AND ( ( Clo - Ope ) / ( .001 + Hi - Lo ) > .8 ) );
Sell = ( ( Ope > Clo ) AND ( ( Ope - Clo ) / ( .001 + Hi - Lo ) > .8 ) );
AddColumn( Ope, "Open" );
AddColumn( Clo, "Close");
AddColumn( Hi, "High");
AddColumn( lo, "Low");
TimeFrameRestore();
_SECTION_END();
The values which I am getting is all crap. For ex: For Apollo Tyres, following are values which it has printed. Looks like it is taking Daily Values
Open =107.85 (No idea where it came from)
Close =107.85 (30th Jan Close)
High= 108.3 (30th Jan High)
Low=104.5 (30th Jan Low)
You are getting garbage value in Ope because you have typed zero instead of letter O in third TimeFrameGetPrice function...