US GDP disappointment brings non-farm payrolls into spotlight; RBA favoured to set new historical low cash rate of 1.50%; BoE expected to cut when they meet Thursday

By Ian Dobbs*:

Central bank meetings dominate the focus initially this week starting with the RBA decision on rates this afternoon.

Expectations are divided, although favour a move to a new historical low of 1.5% when the decision is announced this afternoon.

Focus will again be on the UK later in the week as the BoE meets to review their monetary policy settings on Thursday. Expectations are high that they will deliver a cut in rates to 0.25% in a move that will mark the first change since March 2009.

A Reuters poll of 49 economists published last week showed all but three expecting the bank to cut by at least 25 bps. The poll is in stark contrast to expectations prior to the EU exit vote which pointed to the next move in UK rates being higher.

Focus for the week will round out in the US with the July Non-Farm Payrolls employment release.

Look for close scrutiny after Friday’s second quarter GDP disappointment which has now seen the market move to reduce the chances of a 2016 Fed rate hike to around 36% currently.

Major Announcements last week:

  • US New Home Sales, 3.5% m/m vs. 1.1% exp. (Jun.)
  • Australia Q2 Inflation, 0.4% q/q on exp.
  • UK Q2 GDP, 0.6% q/q vs. 0.4% exp.
  • US Durable Goods Orders, -4.0% vs. -1.1% exp. (Jun.)
  • US Fed Interest Rate Decision, 0.5% on exp.
  • EU Consumer Confidence, -7.9 as exp. (Jul.)
  • NZ Building Permits s.a., 16.3% m/m vs. 0.1% prior (Jun.)
  • Japanese Inflation, -0.4% y/y vs. -0.4% prior (Jun.)
  • BOJ Interest Rate Decision, -0.1% unchanged.
  • Australian Private Sector Credit, 0.2% m/m vs. 0.4% prior (May)
  • Canadian GDP, -0.6% vs. -0.5% m/m (May.)
  • US Q2 GDP, 1.2% vs. 2.6% exp.
  • German IFO-Business Climate, 108.3 vs. 107.5 exp. (Jul.)

NZD/USD

The New Zealand dollar has continued to rise against the USD on the back of a continued sell-off in the greenback after Friday’s weaker than expected key US growth data. The numbers had the market further reducing its expectation of a 2016 US rate hike, backing-up those reductions already seen earlier in the week. Dairy price data and NZ employment numbers are in focus (and the RBA today), although again expect Friday’s US data (employment) to have a significant bearing. The volatility of the USD will again make the direction difficult to see this week, especially given the disconnect that the NZD has to the RBNZ’s desired path (as global factors dictate).

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7176 0.6950 0.7230 0.6985 – 0.7229

NZD/AUD (AUD/NZD)

The New Zealand dollar is trading at highs not seen in nearly three weeks against the Australian dollar in current trade. The move comes in anticipation by many (~68%) of a further reduction in the cash rate (to 1.5%) by the RBA when they issue their statement this afternoon (2.30 pm AEST). Look for this decision and the NZ employment data tomorrow to drive the cross over the days ahead. Expect Thursday’s Australian retail sales number to have only a minor impact in comparison. Some NZD resistance should be expected around .9600 (1.0417 support), although key resistance lies ahead of .9700 (1.0309 support). Key support is noted around the recent lows at .9280 (1.0776 resistance).

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9518 0.9400 0.9600 0.9343 – 0.9535
AUD / NZD 1.0507 1.0417 1.0638 1.0487 – 1.0703

NZD/GBP (GBP/NZD)

The New Zealand dollar has continued to advance in trade against the UK pound since our report on Friday. The move comes as the NZD rallied strongly in response to weaker than expected US data on Friday, as the market further reduced expectations of a US rate hike in 2016. The reaction reflects the greater demand for high yielding currencies like the NZD in a world of low interest rates and comes as expectations of a BoE rate cut on Thursday remain high. Expect the outcomes of this meeting to drive trade this week. Second (and key) NZ dollar resistance is seen at .5650 (support 1.7699).

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5436 0.5250 0.5550 0.5335 – 0.5467
GBP / NZD 1.8397 1.8018 1.9048 1.8290 – 1.8745

 NZD/CAD

The New Zealand dollar has continued to move higher against the Canadian dollar since our last report. The move comes as the CAD dropped overnight on lower oil prices, whilst demand for the high yielders (like the NZD) were noted in late trade on Friday on the back of the weaker than expected US growth data. This came as Canadian growth data issued at the same time was slightly weaker than expected (CAD-). Look for the respective employment releases from both countries (starting tomorrow in NZ) to help set sentiment for the cross this week.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9415 0.9240 0.9550 0.9241 – 0.9430

NZD/EURO (EURO/NZD)

The New Zealand dollar has firmed marginally against the Euro in trade since Friday. Both currencies were beneficiaries of the USD weakness noted on Friday, although relative gains were seen by the high yielders after the weaker than expected US data. Highs around .6470 (1.5456 lows) is the first NZD resistance (minor), although the stronger key resistance lies above .6600 (1.5152 support). We are expecting a relatively quiet week overall this week with volatility to spike over the RBA today (somewhat) and NZ employment data tomorrow.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6422 0.6300 0.6470 0.6358 – 0.6470
EUR / NZD 1.5573 1.5456 1.5873 1.5455 – 1.5728

NZD/YEN

The New Zealand dollar has weakened against the Japanese Yen since our report on Friday. The move comes on the back of the surge in the Yen on Friday after the BOJ delivered an underwhelming amount of extra stimulus at its monetary policy announcement during the afternoon. Weaker than expected US data late in the day and the subsequent demand for high yielders (as US rate hike expectations reduced further on weak US data) such as the NZD have limited the damage to the cross. Look for the volatility in this cross to peak over the next 24 hours as we receive NZ employment data and details on the Japanese government stimulus.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 73.43 71.00 75.00 73.18 – 74.70

AUD/USD

The Australian dollar sits relatively unchanged in trade against the USD since our report on Friday. This comes as highs around the .7615 level traded yesterday in the aftermath of Friday’s weak US growth data, which saw the market reducing exposure to the USD against most of its key peers. Direction this week will come initially this afternoon over the RBA interest rate decision and statement. Expectations are around 68% on the chance of a cut at today’s meeting. Other events of interest are Thursday’s Australian retail sales numbers (much less so) and Friday’s RBA monetary policy statement and US employment data. We lack a bias ahead of today’s announcement.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7537 0.7240 0.7615 0.7422 – 0.7615

AUD/GBP (GBP/AUD) 

The Australian dollar is drifting against the UK pound in current trade ahead of today’s key RBA monetary policy decision. Resistance was seen again yesterday around last week’s highs (.5755, 1.7376 lows) as the AUD momentum continued to be positive after Friday’s key US data miss. Gains for the GBP on the weak US data have moderated this week in part on the back of the downwards UK manufacturing PMI revision yesterday. Look for today’s RBA decision and the BoE decision on Thursday to set the direction for this week. July highs around .5865 (1.7050 lows) is the initial target for a BoE cut/RBA no cut combo.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5709 0.5625 0.5760 0.5657 – 0.5759
GBP / AUD 1.7516 1.7361 1.7778 1.7364 – 1.7678

AUD/EURO (EURO/AUD)

The Australian dollar has eased against the Euro since Friday in a move which has largely been a result of weakness in the AUD ahead of this afternoon’s key RBA monetary policy decision. Expectations are high (~68%) for a further cut in the cash rate at the meeting this afternoon after last week’s soft local inflation data. This decision looks very likely to set the direction in this cross for most of the week. Support is noted at .6650 (1.5038 resistance) whilst initial AUD resistance should be seen around .6825 (1.4652 support). Key topside resistance is noted around .6900 (1.4493 support).

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6745 0.6650 0.6825 0.6739 – 0.6861
EUR / AUD 1.4826 1.4652 1.5038 1.4575 – 1.4840

AUD/YEN

The Australian dollar has weakened against the Japanese Yen since our report on Friday. The move comes on the back of the Yen strength (initially) which came later on Friday after the BOJ underwhelmed the market with the degree and type of extra stimulus announced at its monetary policy meeting. Weakness in the AUD has been seen in recent hours ahead of this afternoon’s key RBA monetary policy decision. Expect the decision at this meeting to set the tone of trade this week in the cross. For now the cross looks heavy and we favour selling a decent rally should the RBA remain on hold. Second resistance and a sell target could be the 79.50/60 zone.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 77.12 74.50 78.20 77.00 – 79.56

AUD/CAD

The Australian dollar sits unchanged in trade against the Canadian dollar since Friday. The lateral trading comes as a result of weakness in both the CAD and AUD in recent hours, the former on the back of a heavy oil price, the latter in the lead-up to this afternoon’s key decision on rates at the RBA monetary policy meeting. Resistance ahead of .9970 again should be appealing for CAD buyers in the event the RBA remains on hold, whilst a cut should open a move to support at .9730 in time. We lack any bias on the outcome this afternoon.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9889 0.9730 0.9970 0.9833 – 0.9971

————————————————————————————————————-

To subscribe to our free daily Currency Rate Sheet and News email, enter your email address here.

Email:  

————————————————————————————————————————–

Market commentary:

Central bank meetings dominate the focus initially this week starting with the RBA decision on rates this afternoon. Expectations are divided, although favour a move to a new historical low of 1.5% when the decision is announced this afternoon. Focus will again be on the UK later in the week as the BoE meets to review their monetary policy settings on Thursday. Expectations are high that they will deliver a cut in rates to 0.25% in a move that will mark the first change since March 2009. A Reuters poll of 49 economists published last week showed all but three expecting the bank to cut by at least 25 bps. The poll is in stark contrast to expectations prior to the EU exit vote which pointed to the next move in UK rates being higher. Focus for the week will round out in the US with the July Non-Farm Payrolls employment release. Look for close scrutiny after Friday’s second quarter GDP disappointment which has now seen the market move to reduce the chances of a 2016 Fed rate hike to around 36% currently.

Australia

Last week was a relatively quiet one in Australia which saw the local currency finish the week on its highs against the USD. This came after the release of a much weaker than expected first estimate of the US June quarter GDP on Friday. Earlier in the week attention was focussed on the local inflation numbers which came in affirming the market’s expectation of a soft print. This is likely to put pressure on the RBA today to respond given inflation is currently sitting at half of the minimum targeted level. Like the RBNZ though, the RBA faces the issue of heated property markets particularly in Sydney and Melbourne and a local currency which is being driven by global forces beyond its control. These factors make this afternoon’s decision particularly interesting. Other data released last week included the terms of trade which rose 2.7% and Friday’s private sector credit numbers which halved from the month prior. The data fell short of expectations, although remains firm as record low interest rates support. Data released this week started with HIA new home sales which rose sharply in June following two months of weakness. Other events of interest includes this afternoons’ building approvals and trade data, retail sales on Thursday, and the RBA statement on monetary policy on Friday (no forecast changes expected).

New Zealand

The NZD finished the week on a strong footing after it was led higher by a sharply weaker USD, which finished the week on its lows after a much weaker than expected first read of the Q2’s GDP. The persistent currency strength will frustrate the RBNZ which must feel it is fighting a losing battle. Global forces such as that seen on Friday have driven the NZD TWI back to levels near where it was trading prior to their special economic update issued last month. Data issued locally last week was centred on Friday. This saw the release of the latest building permits numbers which rose sharply in June as they continued their upwards trend from 2011. ANZ business confidence numbers also released on Friday edged lower in July, although a net 16% of those surveyed still expected better economic conditions in the coming year. The numbers reflected strong positive sentiment from the construction sector. Trade data released earlier in the week caused little stir after it printed in line with expectations. Indicators this week begin with the RBNZ inflation expectations survey today and the GDT dairy auction overnight (futures up 7% currently). Employment data for the second quarter due for release tomorrow with dominate the week overall.

United States

Last week was a poor one for the greenback which saw the USD (DXY) index fall each day during the week to close on its lows. Data was mixed earlier in the week, although finished the week on a poor note after the Q2 GDP lifted just 1.2% q/q, less than half that was expected. Downwards revisions to the last few quarters’ back data added to the poor sentiment and show a sharp contraction in the momentum from numbers which were as high as 2.8% (averaged) in the year ended Q2 2015. The other highlight of the week was the FOMC meeting which saw expectations of a 2016 hike move from 50% prior to 45% after, although Friday’s data saw this reduce further to around 36%. Other data released over the week included upside surprises in the Dallas Fed (manufacturing), Chicago PMI and CB consumer confidence. Further positive numbers came from the housing sector which saw new homes sales rise 3.5% m/m in June. Durable goods orders were weak, falling 4% on the month whilst both the Michigan consumer sentiment and consumer expectation series (also released on Friday) disappointed. The July ISM manufacturing survey released yesterday eased from June, whilst below expectations it was still the 5th consecutive month of expansion. Looking out to later this week we have the ISM non-manufacturing reads and key Non-farm Payrolls employment on Friday.

Europe

Weaker than expected US data saw the Euro shoot up to levels not seen in over a month against the USD in trade on Friday. The data rounded out what was a poor week for the greenback which provided support for the single currency throughout the week. Local leads were second tier last week. The German IFO was seen beating expectations, whilst positive surprises were also provided from the German unemployment and inflation reads. Eurozone consumer confidence was soft, although Friday’s harmonised euro area inflation followed the German lead earlier in the week by rising slightly more than expectations (0.2% y/y). The data shows inflation across the eurozone well below the near 2% target of the ECB. However, core inflation, which excludes food and energy, is currently running at 0.9%, just 0.1% below the level recorded at the start of the year. Data released yesterday saw marginal revisions (upwards) to the German and euro area manufacturing PMI indicators, whilst the rest of the week will also see further composite PMI reads and reads (PMI) from the services sector.

United Kingdom

Expect an interesting week in the UK which will be dominated by Thursday’s BoE interest rate meeting. Expectations are high that the BoE will cut at this meeting after its disappointment last month. However, the move is not a complete certainty given the limited and varying data that the bank has had since the June 23rd EU exit vote. Data last week on the second quarter’s GDP implied strong economic momentum heading into the vote after the economy expanded 0.6% q/q , whilst house prices were also seen rising against expectations in July. Net lending to individuals and consumer credit both rose by more than expected in June, although mortgage approvals for the same month undershot its consensus expectation. Manufacturing data released yesterday which showed the PMI indicator being adjusted lower from its flash reading also disappointed. In focus today will be the construction PMI read, whilst tomorrow sees the services sector PMI release. Halifax house prices are set to round out the week, although expect the data to be of secondary importance to the BoE meeting.

Japan

Attention last week was centred on Friday’s highly anticipated BOJ decision. The outcome of the meeting was hugely disappointing for those who had expected a large expansion in stimulus. The announcement of both an unchanged policy rate (-0.1%) and monetary base expansion of the current 80 Trillion Yen was a flop. It came as the central bank only adjusted policy at the margin by boosting USD lending and its purchases of exchange traded funds (ETFs). The move followed disappointment earlier in the week after the government announced fiscal stimulus package (details to be announced today) was revealed to contain little in the way of new funds. Data released during the week came on Friday. The releases included the latest inflation read which confirmed the BOJ’s inflation problem as it fell 0.4% y/y, well below the 2% target which the BOJ admitted it will have trouble meeting on Friday. Other data was mixed, overall household spending was weak (the decline doubled from the prior read), whilst the retail trade numbers were also soft but managed to marginally beat the consensus. Weakness was also seen in the construction orders and vehicle production numbers whilst positive surprises were provided by the latest industrial production, unemployment, and housing start reads, although the latter fell well into negative territory.

Canada

The Canadian dollar sits weaker against the USD in opening trade this week, although is near the middle of last week’s range after it closed close to its highs on Friday on the back of much weaker than expected US growth data. Oil prices have again contributed to the most recent sell-off and come as the price of WTI crude fell below $US40 (bbl) overnight. This was on the back of continued concerns of the elevated inventory levels (US gas and crude stockpiles are at highest seasonal levels in 20 years) and after a Reuter’s survey put output from OPEC countries at record highs when compared with figures in recent history. Local data leads last week were sparse. They included the latest GDP numbers for May which fell by more than expected. The decline from the month prior was the largest since 2009, although was fortunately overshadowed by the larger miss in the simultaneous US GDP data release. Events of interest this week are again centred at the end of the week. They include indicators on employment, trade and the Ivey purchasing managers index.

Daily exchange rates

<!–

var root_url = "http://www.interest.co.nz/charts-csv/";
var tabs_count="7";
var csvfiles_loc= ["/charts-csv/chart_data/exchangerates/daily-usd.csv"," /charts-csv/chart_data/exchangerates/daily-aud.csv"," /charts-csv/chart_data/exchangerates/daily-twi.csv"," /charts-csv/chart_data/exchangerates/daily-yen.csv"," /charts-csv/chart_data/exchangerates/daily-yuan.csv"," /charts-csv/chart_data/exchangerates/daily-eur.csv"," /charts-csv/chart_data/exchangerates/daily-gbp.csv"];
var chart_title_arr= ["US dollar","Australian dollar","Trade weighted index","Japanese Yen","Chinese Yuan","Euro","British pound"];
var chart_subtitles_arr= ["Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate","Daily benchmark rate"];
var tab_titles_arr= ["US$","AU$","TWI","u00a5en","u00a5uan","u20acuro","GBP"];
var source_arr= ["RBNZ","RBNZ","RBNZ","RBNZ","RBNZ","RBNZ","RBNZ"];
var source_hyperlink_arr= ["8"];
var tabswidth="8";
var decimal_arr= ["4","4","4","2","2","4","4"];

// variable declaration
var xpad;
var padding_value=0;
var range_selector=0
var loc;
var updt;
var val_num;
var vi=0;
var max_val;
var x;

var finalAr = new Array();
for (var i = 0; i <= tabs_count; i++) {
finalAr[i] = new Array();
}
var flagAr = new Array();
for (var i = 0; i <= tabs_count; i++) {
flagAr[i] =[];
}
var yaxisAr = new Array();
for (var i = 0; i 536)
{
var b = arr.length – 536; // to get last 36 points
}
else if (arr.length < 536)
{
var b = 537 – arr.length;
}
else if(arr.length == 536)
{
var b=2;
}

// to generate the format for date representation in x axis

var timestamweek = 604800000;
var timestamday = 86400000;
var timestammonth30 = 2592000000;
var timestammonth31 = 2678400000;
var timestamyear = 31536000000;
var timestamquarterly = 7776000000;

for (var u=0;u<2;u++) {
arr[u] = parseLineCSV(arr[u]);
fomat= String(arr[u][0]);
var k=0;

do {
k++;
} while(fomat.charAt(k)!="-")
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!="-")
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var yy = "20"+fomat.substring(k2+1,k3+1);
var yy1=fomat.substring(k2+1,k3+1);

// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == "Jan")
{
mm= "01";
}
else if (mm == "Feb")
{
mm= "02";
}

else if (mm == "Mar")
{
mm= "03";
}

else if (mm == "Apr")
{
mm= "04";
}

else if (mm == "May")
{
mm= "05";
}

else if (mm == "Jun")
{
mm= "06";
}

else if (mm == "Jul")
{
mm= "07";
}

else if (mm == " Aug")
{
mm= "08";
}

else if (mm == "Sep")
{
mm= "09";
}

else if (mm == "Oct")
{
mm= "10";
}

else if (mm == "Nov")
{
mm= "11";
}

else if (mm == "Dec")
{
mm= "12";
}

// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date2 = mm+"/"+dd+"/"+yy;

if (u==0)
{
var timestam1 = Date.parse(date2);
}
else if(u==1)
{
var timestam2 = Date.parse(date2);
}
}
var timestamvar = (timestam2- timestam1);
var flagAR_count=0;
for (var i=2;i<arr.length;i++) {
flagAR_count++;
var tempAr = new Array();
var tempAr1 = new Array();
arr[i] = parseLineCSV(arr[i]);
if (arr[i]!='')
{

fomat= String(arr[i][0]);
replic=String(arr[i][0]);
var k=0;

do {
k++;
} while(fomat.charAt(k)!="-")
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!="-")
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var current_year=""+new Date().getFullYear();
var c_year=Number(current_year.substring(2,4));
var c_data=Number(''+fomat.substring(k2+1,k3+1));
if(c_data c_year)
{
var yy = “19”+fomat.substring(k2+1,k3+1);
}
else if(c_data == c_year)
{
var yy = “20”+fomat.substring(k2+1,k3+1);
}
// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == “Jan”)
{
mm= “01”;
}
else if (mm == “Feb”)
{
mm= “02”;
}

else if (mm == “Mar”)
{
mm= “03”;
}

else if (mm == “Apr”)
{
mm= “04”;
}

else if (mm == “May”)
{
mm= “05”;
}

else if (mm == “Jun”)
{
mm= “06”;
}

else if (mm == “Jul”)
{
mm= “07”;
}

else if (mm == “Aug”)
{
mm= “08”;
}

else if (mm == “Sep”)
{
mm= “09”;
}

else if (mm == “Oct”)
{
mm= “10”;
}

else if (mm == “Nov”)
{
mm= “11”;
}

else if (mm == “Dec”)
{
mm= “12”;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date = mm+”/”+dd+”/”+yy;

var timestam_1 = Date.parse(date);
var timestam= timestam_1+86400000; //86400000 added to get correct timezone output from Date.parse
var time4 = new Date(timestam);
var Weeko = time4.getDay();
var dd2 = time4.getDate();
var mm2 = time4.getMonth();
var flag_y=arr[i][1];
var ahref_title=”Click here for full story”;
if(arr[i][2]) {
var url=arr[i][2];
var flag_date='{“x”:’+timestam+’, “title”:”  “,”text”:”Click here for Story!”}’;

flagAr[csvgen_counter].push(flag_date);
}
var yy2 = time4.getFullYear();
var yy3 = yy2+””;
var yy4= yy3.substring(2,4);
//++++++++++++++++++++++++this for days conversion++++++++++++++++++++++++++++
if (Weeko==1)
{
Weeko = “Mon”;
}

else if (Weeko==2)
{
Weeko = “Tue”;
}

else if (Weeko==3)
{
Weeko = “Wed”;
}

else if (Weeko==4)
{
Weeko = “Thu”;
}

else if (Weeko==5)
{
Weeko = “Fri”;
}

else if (Weeko==6)
{
Weeko = “Sat”;
}

else if (Weeko==0)
{
Weeko = “Sun”;
}

//+++++++++++++++++++++++this is for month conversion+++++

if (mm2==0)
{
mm2 = “Jan”;
}

else if (mm2==1)
{
mm2 = “Feb”;
}

else if (mm2==2)
{
mm2 = “Mar”;
}

else if (mm2==3)
{
mm2 = “Apr”;
}

else if (mm2==4)
{
mm2 = “May”;
}

else if (mm2==5)
{
mm2 = “Jun”;
}

else if (mm2==6)
{
mm2 = “Jul”;
}

else if (mm2==7)
{
mm2 = “Aug”;
}

else if (mm2==8)
{
mm2 = “Sep”;
}

else if (mm2==9)
{
mm2 = “Oct”;
}

else if (mm2==10)
{
mm2 = “Nov”;
}

else if (mm2==11)
{
mm2 = “Dec”;
}
//++++++++++++++++++++++++++++++++++++++++

//weekly
if ( timestamvar == timestamweek)
{
fomat2=dd2+”-“+mm2+”-“+yy4;
padding_value=timestamweek;
range_selector=2;
}

// Daily
else if ( timestamvar = timestamyear)
{
fomat2=mm2+”-“+yy4;
padding_value=timestamyear;
range_selector=3;
}

//monthly
else if ((timestamvar <= timestammonth30)&&(timestamvar = timestamquarterly)
{
fomat2=mm2+”-“+yy4;
padding_value=timestamquarterly;
range_selector=3;
}

else
{
fomat2=dd2+”-“+mm2+”-“+yy4;
padding_value=timestamday;
range_selector=3;
}

arr[i][0]= fomat2;
var decpad;
decpad = parseFloat(arr[i][1]);
arr[i][1] = decpad;

if(i==(arr.length-1))
{

// Functionality to get the last value

var xvalu=dd2+”-“+mm2+”-“+yy4;
var yvalu= String(arr[i][1]);
var xyvalu=”Latest value at “+xvalu+” is “+yvalu;
updt=”Updated on “+xvalu;
}

tempAr.push(timestam);
if(!arr[i][1])
{
arr[i][1]=null;
}
yaxisAr[csvgen_counter].push(arr[i][1]);
// tempAr1.push(timestam);
// tempAr2.push(tempAr1);
tempAr.push(arr[i][1]);
last_val=timestam;
finalAr[csvgen_counter].push(tempAr);
}
xpad=last_val+padding_value; //*****************to end up graph early//////
if(arr[i]== “”)
{
vi=arr.length-i;
arr.length=arr.length-vi;
i=arr.length-1;
fomat = replic;

var k=0;

do {
k++;
} while(fomat.charAt(k)!=”-“)
var k1 =k;

do {
k++;
} while(fomat.charAt(k)!=”-“)
var k2=k;

do {
k++;
} while(k<fomat.length)
var k3=k;

var dd= fomat.substring(0,k1);
var mm = fomat.substring(k1+1,k2);
var yy = "20"+fomat.substring(k2+1,k3+1);

// conversion of months into numerical form

//+++++++++++++++++++++++++++++++++++
if (mm == "Jan")
{
mm= "01";
}
else if (mm == "Feb")
{
mm= "02";
}

else if (mm == "Mar")
{
mm= "03";
}

else if (mm == "Apr")
{
mm= "04";
}

else if (mm == "May")
{
mm= "05";
}

else if (mm == "Jun")
{
mm= "06";
}

else if (mm == "Jul")
{
mm= "07";
}

else if (mm == "Aug")
{
mm= "08";
}

else if (mm == "Sep")
{
mm= "09";
}

else if (mm == "Oct")
{
mm= "10";
}

else if (mm == "Nov")
{
mm= "11";
}

else if (mm == "Dec")
{
mm= "12";
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++

var date = mm+"/"+dd+"/"+yy;
//here flagAr may be
var timestam = Date.parse(date);
var time4 = new Date(timestam);
var Weeko = time4.getDay();
var dd2 = time4.getDate();
var mm2 = time4.getMonth();

var yy2 = time4.getFullYear();
var yy3 = yy2+"";
var yy4= yy3.substring(2,4);
//++++++++++++++++++++++++this for days conversion++++++++++++++++++++++++++++
if (Weeko==1)
{
Weeko = "Mon";
}

else if (Weeko==2)
{
Weeko = "Tue";
}

else if (Weeko==3)
{
Weeko = "Wed";
}

else if (Weeko==4)
{
Weeko = "Thu";
}

else if (Weeko==5)
{
Weeko = "Fri";
}

else if (Weeko==6)
{
Weeko = "Sat";
}

else if (Weeko==0)
{
Weeko = "Sun";
}

//+++++++++++++++++++++++this is for month conversion+++++

if (mm2==0)
{
mm2 = "Jan";
}

else if (mm2==1)
{
mm2 = "Feb";
}

else if (mm2==2)
{
mm2 = "Mar";
}

else if (mm2==3)
{
mm2 = "Apr";
}

else if (mm2==4)
{
mm2 = "May";
}

else if (mm2==5)
{
mm2 = "Jun";
}

else if (mm2==6)
{
mm2 = "Jul";
}

else if (mm2==7)
{
mm2 = "Aug";
}

else if (mm2==8)
{
mm2 = "Sep";
}

else if (mm2==9)
{
mm2 = "Oct";
}

else if (mm2==10)
{
mm2 = "Nov";
}

else if (mm2==11)
{
mm2 = "Dec";
}
//++++++++++++++++++++++++++++++++++++++++

//weekly
if ( timestamvar == timestamweek)
{
fomat2=dd2+"-"+mm2+"-"+yy4;
}

// Daily
else if ( timestamvar = timestamyear)
{
fomat2=mm2+”-“+yy4;
}

//monthly
else if ((timestamvar <= timestammonth30)&&(timestamvar = timestamquarterly)
{
fomat2=mm2+”-“+yy4;
}

arr[i][0]= fomat2;
var decpad;

decpad = parseFloat(arr[i][1]);
//arr[i][1] = roundVal(decpad);
arr[i][1] = decpad;
if(i==(arr.length-1))
{

var xvalu=dd2+”-“+mm2+”-“+yy4;
var yvalu= String(arr[i][1]);
var xyvalu=”Latest value at “+xvalu+” is “+yvalu;
updt=”Updated on “+xvalu;
}
}

}
}

//other required functions

//chart configuration starts here

function getXMLHttpRequest(file) {

//var arrSignatures = [“MSXML2.XMLHTTP.5.0”, “MSXML2.XMLHTTP.4.0″,
//”MSXML2.XMLHTTP.3.0”, “MSXML2.XMLHTTP”,
//”Microsoft.XMLHTTP”];

//for (var i=0; i < arrSignatures.length; i++) {

try
{
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("POST",file,false);
return xmlhttp;
}
catch(e)
{
error=e.message;
}

//}
throw new Error("MSXML is not installed on your system.");
}

function readCSV(locfile) {
// load a whole csv file, and then split it line by line
var req = new getXMLHttpRequest(locfile);
//req.open("POST",locfile,false);
req.send("");
return req.responseText.split(/n/g);
}

function parseLineCSV(lineCSV) {
// parse csv line by line into array
var CSV = new Array();

lineCSV = lineCSV.replace(/,/g," ,");

lineCSV = lineCSV.split(/,/g);

// This is continuing of 'split' issue in IE
// remove all trailing space in each field
for (var i=0;i<lineCSV.length;i++) {
lineCSV[i] = lineCSV[i].replace(/s*$/g,"");
}

lineCSV[lineCSV.length-1]=lineCSV[lineCSV.length-1].replace(/^s*|s*$/g,"");
var fstart = -1;

for (var i=0;i=0) {
for (var j=fstart+1;j<=i;j++) {
lineCSV[fstart]=lineCSV[fstart]+","+lineCSV[j];
lineCSV[j]="-DELETED-";

}
fstart=-1;
}
}
fstart = (lineCSV[i].match(/^"/)) ? i : fstart;
}

var j=0;

for (var i=0;i<lineCSV.length;i++) {
if (lineCSV[i]!="-DELETED-") {
CSV[j] = lineCSV[i];
j++;
}

}

return CSV;
}

function roundVal(val_num){
var dec = 2;
var result = Math.round(val_num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}

function setdecimalpoints(deca)
{
var deca1= deca;
var deca2= parseInt(deca);
if((deca1-deca2)!=0)
{
return 2;
}
else
{
return 0;
}
}
for(i=0;i

Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…
Charts loading…

—————————–

Ian Dobbs is a currency analyst with Direct FX You can contact him here »