[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Retrieving yesterday's daily O/H/L/C during RTH in an intraday database?


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: RE: [amibroker] Retrieving yesterday's daily O/H/L/C during RTH in an intraday database?
  • From: ram vel <rvlv@xxxxxxxxx>
  • Date: Fri, 11 Sep 2009 22:14:59 -0700 (PDT)

PureBytes Links

Trading Reference Links



Hi  Joris M Schuller
 
Many thanks. This code of yours is rally very comfortable to use.
 
once again  thanks for sharing with us,
best regards
rvlv


--- On Fri, 9/11/09, Joris M.schuller <jmschuller@xxxxxxxxxxx> wrote:

From: Joris M.schuller <jmschuller@xxxxxxxxxxx>
Subject: RE: [amibroker] Retrieving yesterday's daily O/H/L/C during RTH in an intraday database?
To: amibroker@xxxxxxxxxxxxxxx
Date: Friday, September 11, 2009, 5:31 PM

 

/*

I expanded a little bit On Reinsley's code (see below) for those that work in 24 Hour markets(e.g. Forex). I left his code intact: Additions are between ADDED-END markers.

This way one can easily look NOT just at (1)EOD, but also (2)at the European/London/ NY/Tokyo sessions' 1st Hour. Also, those who use premarket can easily compare today's premarket and first hour with previous days 1st Hour.

*/

// High and Low of the first 60 minutes

//////////// ///////// ///////ADDED/ ///////// ///////// /////////

EndOfDayForex=ParamToggle("EndOfDay|Forex","EndOfDay|Forex",0);

starttime = ParamTime( "Start Time", "08:00" );

endtime = ParamTime( "End Time", "08:45" );

//////////// ///////// ///////// ////// END///////// ///////// ///////// ///////// ////////

//starttime = 080000;

//endtime = 084500;// write 084500 to catch the close of 090000 in 15' TU

tn = TimeNum();

timecond = tn >= starttime AND tn <= endtime;

firstBarOfDay = timecond ;

firstBarOfDay = firstBarOfDay - Ref( firstBarOfDay, -1 );

xHigh = ValueWhen( timecond, HighestSince( firstBarOfDay, High ) );

xLow = ValueWhen( timecond, LowestSince( firstBarOfDay, Low ) );

DH = TimeFrameCompress( xHigh, inDaily, compressLast );

DL = TimeFrameCompress( xLow, inDaily, compressLast );

DH = TimeFrameExpand( DH, inDaily, expandFirst );

DL = TimeFrameExpand( DL, inDaily, expandFirst );

SetBarsRequired( -2, -2 );

SetChartOptions( 0, chartShowDates );

Plot( C, "C", colorBlack, 64 );

//////////// ///////// ///////ADDED/ ///////// ///////// ///////// ////

Null1=Null2=Null

if (EndOfDayForex)

{

DH=xHigh;

DL=XLow;

Null1=DH;

Null2=DL;

}

Plot( IIf( tn > endtime , DH, Null1 ), "\nDH", colorRed, styleThick + styleDashed + styleThick+styleNoLabel);//CHANGED Null to Null1

//PlotShapes( IIf( tn > endtime , shapeHollowSmallCir cle, shapeNone) ,colorBlue, 0, DH, 0 );

Plot( IIf( tn > endtime , DL, Null2 ), "DL", colorGreen, styleThick + styleDashed + styleThick+styleNoLabel);//CHANGED Null to Null2

//////////// ///////// ///////// ////// END///////// ///////// ///////// ///////// ////////

 

//PlotShapes( IIf( tn > endtime , shapeHollowSmallCir cle, shapeNone),colorBlu e, 0, DL, 0 );

Plot( timecond, "", colorLightGrey, styleArea | styleOwnScale, 0, 1 );

//2.61% support AND resistance

res261 = DL + (DH - DL) * 2.618;

sup261 = DH - (DH - DL)* 2.618;

Plot( res261 , "\nR261", colorGold, 8 );//"261,8% Resistance."

Plot( sup261 , "S261", colorGold, 8 );//"261,8% Support."

GraphXSpace = 10;

 

 

 

From: amibroker@xxxxxxxxx ps.com [mailto:amibroker@ yahoogroups. com] On Behalf Of reinsley
Sent: Friday, September 11, 2009 1:33 AM
To: amibroker@xxxxxxxxx ps.com
Subject: Re: [amibroker] Retrieving yesterday's daily O/H/L/C during RTH in an intraday database?

 

 


Don't apologize, we all are newbies for about a decade or more...

I am the worst AB pedagogue.

Blue lines are the HHV and the LLV of the first hour. We can't plot them
before the end of the first hour.
Adjust the time to match to your market's hour.

Gold lines are support and resistance with a 2.618 fibo ratio. These
lines have nothing to do whith your problem. It's just a ratio that is
often hit by the future I follow. I read nothing about that, it's just a
personnal research.

Sorry, I don't know what a Macd summation index is. I don't have such a
thing in my AB library.

Best regards

ram vel a écrit :
>
>
> Hi reinsley,
>
> Many thanks for your nice code.
> Somehow I could not understand much of it being a newbee.
> If you dont mind,please be kind to explain some critical points as they
> look on the chart.
>
> First what are the blue hollow circles that start after a time gap
> *to catch the HHV and LLV of the today's first hour*
> these circles start after time period mentioned in the code,one
> hour later.
> hope these the first hour high and low for the day to use
> opening range breakout or breakdown?
> second why and what are the 2.618support and 2.618 resistance lines?
> I think these are chosen very meaningfully as being fibo or
> dinapoli levels,targets that are generally hit by price most often
> The difference of DH and DL is multiplied by 2.618 to get highest
> possible resistance and support,by adding it to DL or by subtracting it
> from DH.
>
> iF I am wrong,please correct me.
> Once again, very simple and efficient logic,indeed!
> Thanks for sharing it,
> Good day!
> rvlv
>
> Ps
> *By the way can you please code MACD code for summation index,if possible?*
> *I posted the details earlier,in case you missed seeing it.*
>
>
>

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.91/2363 - Release Date: 09/11/09 09:15:00



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___