Equities pushed higher on US employment data; economic and political cracks appearing globally; NZD eases back from recent highs

By Ian Dobbs*:

Friday’s June US employment report had been widely anticipated by the market last week. The adding of 287k jobs for the month gave the market yet more reason to push equities higher as the S&P 500 reached a new record on Monday.

The Goldilocks report was seen as neither too strong or too weak by the market as it assuaged concerns that the US may be heading for a slowdown, this as May’s poor jobs number saw the market slash the remaining odds of 2016 Fed rate hikes.

Brexit concerns had only caused to push those expectations even lower in recent weeks. Friday’s data did see expectations push up to around 20% for a hike by December however and it remains to be seen given the economic and political cracks appearing globally whether the continued surge in many global equity indices is misplaced.

Major Announcements last week:

  • Australian Building Permits, -5.2% m/m vs. -3.3% exp. (May)
  • UK PMI Construction, 46.0 vs. 50.5 exp. (Jun.)
  • NZ Q2 NZIER Business Confidence, 19% q/q vs. 2% prior.
  • Australian Retail Sales s.a., 0.2% m/m vs. 0.3% exp. (May)
  • Australian Cash Rate, 1.75% as exp.
  • NZ GDT Dairy Prices, -0.4% vs. 0.0% prior.
  • EU Markit PMI Composite, 53.1 vs. 52.8 exp. (Jun.)
  • US ISM Non-Manufacturing PMI, 56.5 vs. 53.3 exp. (Jun.)
  • UK Manufacturing Production, -0.5% m/m vs. -1.0% exp. (May)
  • Canadian Ivey PMI s.a., 51.7 vs. 50.2 exp. (Jun.)
  • US Nonfarm Payrolls, 287k vs. 175k exp. (Jun.)
  • US Average Hourly Earnings, 2.6% y/y vs. 2.5% prior.(Jun.)
  • Canadian Unemployment Rate, 6.8% vs. 7.0% exp. (Jun.)

NZD/USD

The New Zealand dollar has eased from its highs reached last week against the USD which were seen at the close of trade. The move up came on the back of the RBNZ inspired initial move as the market bought the risk and commodity based currencies in response to the better than expected US employment report. Falls have been seen in early trade this week on the back of what would be considered a more normal response of an appreciating USD post the US data. Look for offshore events to dictate this week in light of the empty local event calendar. We favour a sell bias (buy USD) on rallies given the extended levels of many NZD crosses and the NZD TWI.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7229 0.7075 0.7310 0.7081 – 0.7306

NZD/AUD (AUD/NZD)

The New Zealand dollar has eased in recent trade against the Australian dollar on the back of the emerging clarity around the outcome of the Australian election that will see the existing Liberal Coalition party remain in government. Highs seen last week were the highest since April 2015 and came as the NZD outpaced the AUD on the back of the Australian political uncertainty and meek response by the RBNZ to the current housing crisis. We favour buying AUD over the NZD given the rally of the last 2+ months although support at .9470 (1.0560 resistance) will need to give way to open the downside. Look to the Australian employment data on Thursday for direction on the week.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9589 0.9470 0.9700 0.9478 – 0.9695
AUD / NZD 1.0429 1.0309 1.0560 1.0315 – 1.0550

NZD/GBP (GBP/NZD)

The New Zealand dollar has eased against the UK pound since our last report, although not before re-challenged those highs last seen in April 2013 (.5645, 1.7715). The easing comes on the back of the move higher in the GBP in trade overnight in the face of a buoyant USD (which saw the NZD/USD ease from its closing highs last week). Look to the BoE interest rate meeting this Thursday for direction on the week. Expect reasonable volatility given the varied expectations of the likely response from the bank in the new post Brexit vote UK. We continue to see the recent NZD/GBP highs as offering good short term GBP buying levels.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5566 0.5330 0.5650 0.5429 – 0.5645
GBP / NZD 1.7967 1.7699 1.8762 1.7716 – 1.8420

 NZD/CAD

The New Zealand dollar rally against the Canadian dollar has continued since our last report. The move comes on the back of the soft showing from the CAD which has been driven by the recent fall in oil prices, although Friday’s Canadian employment data also had soft undertones. Friday’s firm US data was surprisingly (initially) NZD supportive on the back of ‘risk’ currency buying although the weakness in the NZD/USD exchange rate yesterday has pulled the cross back from its .9550 highs. This level through to .9575 (Dec 2015 highs) is sound resistance and we favour taking advantage of this large NZD/CAD rally to buy CAD. Look to the BoC monetary policy decision on Wednesday and oil pricing for direction this week.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9486 0.9300 0.9575 0.9221 – 0.9546

NZD/EURO (EURO/NZD)

The New Zealand dollar has reversed its gains against the Euro since Friday’s report to be trading largely unchanged in current trade. Highs around .6610 (1.5129) were seen in late trade last week on the back of the buying in the ‘risk’ and commodity currencies after the better than expected US employment report. These currencies have since given up much of the gains in trade this week as the USD has rallied in what would be considered a more normal reaction to positive US data. Look for ‘risk’ sentiment to continue to be important this week for this cross given the light data schedules from both regions. We favour buying dips towards first support for now.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6537 0.6470 0.6615 0.6410 – 0.6613
EUR / NZD 1.5298 1.5117 1.5456 1.5121 – 1.5600

NZD/YEN

The New Zealand dollar has continued its bounce seen from late last week against the Japanese Yen. The move comes largely on the back of the JPY weaknesses seen in response to PM Abe’s win in the upper house of parliament at the weekend and his resultant calls for fresh stimulus to be added into the stagnant Japanese economy. Data from both countries is relatively low impact this week so look for external drivers to dictate. We favour buying JPY over NZD on the back of this bounce in the cross given we are not convinced that this Abe inspired JPY sell-off will continue.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 74.08 71.00 75.00 71.26 – 74.35

AUD/USD

The Australian dollar has rallied against the USD since our report on Friday. The move comes on the back of ‘risk’ currency buying post the better than expected US employment report issued on Friday and as investors react to the now clearer picture of the Australian political landscape that will see the existing Liberal Coalition government remain in power. Events to watch this week are the Australian employment numbers on Thursday, whilst in the US the inflation and retail sales release (both on Friday) should contribute to USD sentiment. We lack any bias from here for the time being.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7534 0.7400 0.7575 0.7410 – 0.7575

AUD/GBP (GBP/AUD) 

The Australian dollar is largely unchanged in current trade against the UK pound since our report on Friday. Highs around .5865 (1.7050) were seen yesterday and came in response to a clearer picture of the Australian political landscape and after the ‘risk’ currencies received a boost on the back of the better than expected US employment data on Friday. Some moderation in the cross has been noted overnight in response to the firmer GBP/USD however. The BoE interest rate meeting and the Australian employment report for June means Thursday will be a key day for fresh direction in this cross.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5802 0.5625 0.5865 0.5662 – 0.5866
GBP / AUD 1.7236 1.7050 1.7778 1.7046 – 1.7663

AUD/EURO (EURO/AUD)

The Australian dollar has continued to firm against the Euro since our last report. The move comes on the back of the solid showing from the AUD after the US employment data on Friday and on the back of the increased political clarity in Australia after counting at the weekend revealed the ruling Liberal Coalition government would remain in power. Look for general sentiment in Europe and the Australian employment data on Thursday to set direction for the cross. We favour buying dips overall (towards .6650, 1.5038) for now.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6814 0.6750 0.6855 0.6695 – 0.6858
EUR / AUD 1.4677 1.4588 1.4815 1.4582 – 1.4937

AUD/YEN

Increased political clarity in Australia after the weekend’s election vote counting and the talk of further stimulus in Japan post PM Abe’s win in the upper house has seen the Australian dollar rally against the Japanese Yen in recent trade. We continue to favour buying the JPY over the AUD as we would treat the ‘Abe’ inspired JPY sell-off with caution given the limited success of other policy responses to cement in weakening the JPY (although we acknowledge the JPY is much stronger this time). Australian employment data on Thursday looks set to be the main economic event for this cross this week.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 77.23 74.50 78.00 74.58 – 77.68

AUD/CAD

The Australian dollar has continued to rally against the Canadian dollar since our report on Friday. The move comes on the back of the positive response by the AUD as ‘risk’ currencies rallied on the back of the better than expected US employment data and as investors reacted to more clarity in the Australian political environment as vote counting at the weekend revealed a win to the current Liberal Coalition government. CAD weakness has also contributed to the move as oil prices continued their recent drift down overnight. Look to the BoC interest rate decision and commentary on Wednesday for initial direction prior to Thursday’s Australian employment data. Expect the price of oil to remain in focus.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9887 0.9740 0.9970 0.9649 – 0.9896

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

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

Email:  

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

Market commentary:

Friday’s June US employment report had been widely anticipated by the market last week. The adding of 287k jobs for the month gave the market yet more reason to push equities higher as the S&P 500 reached a new record on Monday. The Goldilocks report was seen as neither too strong or too weak by the market as it assuaged concerns that the US may be heading for a slowdown, this as May’s poor jobs number saw the market slash the remaining odds of 2016 Fed rate hikes. Brexit concerns had only caused to push those expectations even lower in recent weeks. Friday’s data did see expectations push up to around 20% for a hike by December however and it remains to be seen given the economic and political cracks appearing globally whether the continued surge in many global equity indices is misplaced.

Australia

Counting from last weekends’ Federal election which continued over the weekend has seen the Liberal Coalition retain power and return enough seats to form a majority government, albeit with a slender majority in the lower house. Economic events from last week were led by the cash rate decision which saw the RBA maintain rates at 1.75% as expected and point to the potential for further cuts should inflation remain low. A fall in the latest building approvals numbers was noted, whilst the latest retail sales data pointed to a slowing in momentum. National house price momentum was also seen slowing with lopsided strength in the key cities of Sydney and Melbourne being offset by declines in four of the other capital cities. ANZ jobs ads pointed to reasonable jobs growth although a better indication on the labour market will come on Thursday as the ABS releases the monthly employment figures. Other data this week includes NAB business confidence this afternoon and figures on consumer sentiment on Wednesday. Data released yesterday showed home loans falling by less than expected whilst the value of total housing lending was seen rebounding sharply after April’s decline.

New Zealand

Last week was a quiet one for market moving economic data in NZ. Releases included the latest quarterly NZIER business confidence survey which rose to a net 19% who foresaw an improvement in their trading activity, led by strong confidence in the construction and services sectors. QV house price data showed continued strength in house prices across the country whilst the latest GDT dairy auction was disappointing as prices continued to languish (0.4% decline overall). Strength in the local currency was seen running into the end of the week on the back of stalling by the RBNZ to announce fresh macro-prudential measures to curb investor activity in the housing market, and an acknowledgement by them that further cuts to the OCR would only present further risks. Near 14 month highs (vs. the USD) were seen by the close of the week on the back of the solid US employment report which ignited a rally in risk assets and the commodity currencies. Some normalcy has been restored this week as the USD has begun to rally as would have normally been expected on the upside data surprise. Look once again to offshore leads to drive the NZD this week during a quiet week which has so far featured electronic card retail sales (released yesterday) which rose by more than double that forecast. The data had no impact however, expect Thursday’s business PMI indicator and tomorrow’s food price index to offer little also.

United States

Events last week were dominated by the highly anticipated Nonfarm payroll employment release. The June numbers came in well above expectations as they rebounded sharply from May’s disappointing read. Average hourly earnings remained soft however and the vast majority of jobs were added in the 55 and over age group. The data was enough to see the S&P 500 rally 1.5% to new nominal highs and the US 10-year yield fall to 1.35%, a new low. Expectations for a rate hike in 2016 remain low however although almost doubled to around 20% (by December) after the data. The Fed minutes passed without too much fuss as Brexit concerns and the desire to maintain the flexibility to hike rates was aired. Other data released earlier in the week included the ISM service sector index which jumped well above expectations whilst the factory orders data and latest services PMI number marginally underperformed. Data this week includes the Fed’s Beige book and JOLTs job openings before the more key inflation and retail sales releases on Friday (amongst others). Various Fed members will also speak over the course of the week.

Europe

European banks were in the spotlight last week as focus remained on a fragile Italian banking system which is straining under the weight of ~EUR 300Bn of bad debt. The chief economist of a leading German bank has called for a ~EUR 150Bn bailout of European banks as they struggle with high debt and low Eurozone growth and deflation. Data released last week included German factory order and industrial production numbers which disappointed markedly. Composite and services PMI numbers all either matched or exceeded their consensus in the key countries of France and Germany, and across the wider Eurozone. German trade numbers for May disappointed and were led by a sizeable fall in the export balance. Data this week has started with Italian industrial production numbers which missed their estimates (although passed without fuss) yesterday. The remainder of the week will see the release of regional inflation data starting with Germany today and will conclude with the read for the wider Eurozone on Friday. Other numbers to feature include Eurozone trade and industrial production.

United Kingdom

Sentiment which was once again undermined by the Brexit uncertainty helped the GBP fall to fresh lows against the greenback in trade last week. British equities were volatile during the week as the FTSE 250 continued its post EU vote plunge. Sentiment took a further kick from UK property funds which froze investor redemptions, and as the IMF warned over the impact to UK GDP of an EU exit. Focus was also on the BoE. Governor Carney announced the removing of the counter-cyclical capital buffers on UK financial institutions in order to boost the lending capacity of commercial banks. The BoE will remain in focus this week as the bank meets on meets on Thursday to discuss rates. Expectations are varied on whether a cut will be delivered to bolster sentiment post the Brexit vote, especially given that the drop in the currency and fall in interest rates already seen has delivered a significant easing. An alternative viewpoint in the FT notes that hard economic data will not be available until September and that the BoE MPC will need to rely as they did in 2008 on reports received from the bank’s agents around the country, and that these reports will likely indicate the need to cut to avert a Brexit slowdown. Data released last week was mixed and included misses in the latest construction and services PMI data and better than expected indicators on trade and industrial/manufacturing production.

Japan

Elections have dominated the news in Japan over the weekend as voters went to the polls to choose the upper house of parliament. The result has seen PM Abe’s ruling coalition win a majority as it gained 2/3 of the upper house in a result which suggests Japanese voters see no other viable alternative to ‘Abenomics’ for beating inflation. The PM said yesterday that he would use the victory to push his economic reform program (‘Abenomics’) to bolster inflation with fresh fiscal stimulus spending amounts of up to JPY10 trillion being suggested by the Japanese papers. The news sent the Nikkei 225 up nearly 4% and the Yen sharply lower in trade yesterday. Numbers on core machinery orders did little for the Yen’s cause as they continued the weak trend when released yesterday. Other indicators of interest this week include the Tertiary Activity Index later today and numbers on industrial production and capacity utilization tomorrow. None are expected to cause any more than a passing interest for the market however. Data last week was sparse and included the May current account which came in close to expectations and banking lending which eased marginally from the month prior.

Canada

Falling oil prices has continued to weigh on the fortunes of the Canadian dollar in recent sessions. The move comes on the back of a higher US oil rig count, rising Canadian supplies and cuts in bullish hedge fund bets on the price of crude. Data last week was led by the June employment release which saw the unemployment rate decline to a 11 month low as labour participation fell to its lowest since Dec 1999. The disappointing data saw employment fall slightly during the month although any job gains were part-time in nature and came at the expense of a large fall in the full-time component. Other data included manufacturing PMI numbers which eased from the month prior and trade data which again showed the deficit around record levels. The BoC business outlook survey revealed a soft assessment of business conditions ahead as oil spending remained depressed. Data on the building sector showed issued permits falling well short of expectations in May whilst the Ivey PMI was noted lifting from the month prior. Housing starts released overnight easily beat expectation although focus for this week will be on the BoC monetary policy report on Wednesday.

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 »