Indicators due out will show impact on UK of exit decision; NZD is range bound against majors, except GBP

By Ian Dobbs*:

The GBP will be in focus this week as we receive some of the first major economic indicators since the 23rd June UK vote to exit the EU. Data so far has included surveys and various estimates which point to a downturn, although data from the office of National Statistics this week should provide more tangible clues.

Look for signs of upward price momentum in the inflation and producer price data when released later today, this as the pound’s near 12% trade weighted decline since the vote looks to drive up consumer prices and companies costs.

Clues for any negative impact on the labour market come tomorrow via the jobless claims figures.

Thursday’s retail sales numbers for July will give us evidence of the impact on domestic spending; an area which has so far proved quite resilient.

Expect an interesting week with the GBP/USD sitting poised just above the Brexit 1.2796 lows.

Major Announcements last week:

  • German Industrial Production, 0.8% m/m vs. 0.7% exp. (Jun.)
  • Canadian Building Permits, -5.5% m/m vs. 2.1% exp. (Jun.)
  • Australian NAB Business Confidence, 4 vs. 5 prior (Jul.)
  • UK Manufacturing Production, -0.3% m/m vs. -0.2% exp. (Jun.)
  • UK Total Trade Balance, -5.08 Bn GBP, vs -2.26 Bn GBP prior (Jun.)
  • US Nonfarm Productivity (Q2), -0.5% vs. 0.4% exp.
  • Japanese Machinery Orders, 8.3% m/m vs. 3.1% exp. (Jun.)
  • NZ RBNZ Interest Rate Decision, 2.0% as exp.
  • Canadian New Housing Price Index, 0.1% m/m vs. 0.3% exp. (Jun.)
  • NZ Retail Sales (Q2), 2.3% q/q vs. 1.0% exp.
  • EU Industrial Production s.a., 0.6% m/m vs. 0.5% exp. (Jun.)
  • US Retail Sales, 0.0% m/m vs. 0.4% exp. (Jul.)
  • US Producer Price Index., -0.4% m/m vs. 0.1% exp. (Jul.)

NZD/USD

The New Zealand dollar has traded within a range around .7200 against the USD since our report on Friday. Friday’s weaker than expected US data was met with sellers above .7250 which then saw the NZD drift towards .7160, in part on the back of weaker than expected Chinese data which was released late in the day. We are expecting a relatively quiet week this week with most of the event risk due in the next 24 hours. Thursday mornings (NZ time) US FOMC minutes should also be watched. For now we favour more trade within recent ranges and favour buying toward .7160 or .7100 (less aggressive entry).

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7207 0.7085 0.7350 0.7111 – 0.7318

NZD/AUD (AUD/NZD)

The New Zealand dollar is drifting in trade against the Australian dollar this week. Ranges have been relatively tight since our report on Friday, although this could well change over coming days with employment data due from both countries. Today’s RBA minutes are noted, although should pass without adding little new. Expect a retracement in the NZD if tonight’s GDT dairy auction fails to match the solid gains expected. For now we have little bias and expect .9300-.9470 (1.0753-1.0560) to bound unless the data should vary greatly from expectations.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9393 0.9280 0.9570 0.9309 – 0.9474
AUD / NZD 1.0646 1.0449 1.0776 1.0556 – 1.0743

NZD/GBP (GBP/NZD)

The New Zealand dollar has continued to advance against the UK pound since our last report. The move comes on the back of the weak support for the GBP in recent trade, whilst in contrast demand for the NZD remains elevated via yield and commodity exposure appeal. Data risk for the cross is high this week and will start with numbers on UK inflation later today and employment from both countries tomorrow. Retail data from the UK on Thursday and tonight’s GDT dairy auction should carry a more minor weighting. Key resistance on the NZD topside remains at the multi-peak .5650 highs (1.7699 lows).

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5592 0.5490 0.5650 0.5476 – 0.5623
GBP / NZD 1.7883 1.7699 1.8215 1.7785 – 1.8261

 NZD/CAD

The New Zealand dollar has had a quiet start to the week against the Canadian dollar this week which has seen the cross move sideways since our last report. There has been no material economic data to drive the cross and for now lows around .9300 have held so far. Look to NZ employment and the dairy price data for immediate risk, whilst later in the week we look to Canadian news (Friday) for interest. We have little bias at present at current levels.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9317 0.9290 0.9575 0.9294 – 0.9546

NZD/EURO (EURO/NZD)

The New Zealand dollar is drifting in trade against the Euro since our report on Friday. Both currencies have been benefactors of weaker than expected US data in the interim, whilst on the data front there has been nothing material come to market. This week looks set to be a pretty quiet one for the cross. Employment and dairy price data is due from NZ in the next 24 hours whilst in Europe the inflation numbers and the ECB minutes have the most chance of upsetting (Thursday). We have a marginal NZD upside bias at the moment and would favour buying dips to .6380/90 (selling rallies to 1.5649/1.5674).

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6445 0.6380 0.6620 0.6420 – 0.6545
EUR / NZD 1.5517 1.5106 1.5674 1.5279 – 1.5576

NZD/YEN

The New Zealand dollar has eased marginally against the Japanese Yen since our report on Friday. Reaction to yesterday’s weak Japanese Q2 GDP report was limited and for now the cross remains soft as demand for the Yen remains solid. NZ indicators in the next 24 hours form the main scheduled risk for the cross this week (dairy price and employment). We favour selling rallies, although prefer levels near 74.20/30 first resistance.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 72.78 72.20 74.30 72.60 – 74.10

AUD/USD

The Australian dollar is unchanged against the USD since our report on Friday. Buyers around the .7640/50 area were noted late in the week and overnight as the Aussie drifted lower on worse than expected Chinese data released late on Friday. Thursday looks to be the key risk day for this pair this week as we receive the US FOMC minutes and Australian employment numbers. We have little bias, although for now the momentum appears to point to a re-visit towards last week’s highs.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7668 0.7640 0.7760 0.7623 – 0.7756

AUD/GBP (GBP/AUD) 

The Australian dollar continues to trade on a solid note against the UK pound in current trade. A move under .5900 (over 1.6949) was short lived late last week as demand for the AUD again returned which was helped by positive sentiment for the commodity currencies in general. This week looks set to be a very interesting one for this cross as start to receive some of the most important data seen out of the UK since the UK Brexit vote. Events include numbers on UK inflation and producer prices later today, UK employment tomorrow and Australian employment and UK retail sales on Thursday.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5950 0.5875 0.6000 0.5868 – 0.5974
GBP / AUD 1.6807 1.6667 1.7021 1.6739 – 1.7042

AUD/EURO (EURO/AUD)

The Australian dollar has eased against the Euro in trade since Friday. The drift lower came on the back of reduced demand for the AUD in the wake of weaker than expected Chinese data that was received late on Friday. Losses have been limited to .6830 (1.4641) so far. However, the move has the potential of turning into the third major peak (and fifth sizeable peak) which has formed above .6900 (1.4493) since December last year. This has us wary of further AUD gains in the cross for the time being. Events to watch for the pair this week include the Australian employment numbers on Thursday and EU inflation and the ECB minutes later in the day.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6857 0.6825 0.6950 0.6847 – 0.6933
EUR / AUD 1.4583 1.4388 1.4652 1.4425 – 1.4605

AUD/YEN

The Australian dollar has eased against the Japanese Yen since our last report. The move comes as demand for the Yen remains strong even despite yesterday’s weaker than expected Q2 GDP data. Some pressure was seen on the AUD to end the week on the back of the weaker than expected Chinese data that was received throughout the day. Look to the Australian employment data on Thursday for the main item of interest for the cross this week. We continue to favour selling rallies at present, although expect a subdued week.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 77.44 76.50 78.65 77.35 – 78.61

AUD/CAD

The Australian dollar has continued to retreat in trade against the Canadian dollar since our report on Friday. The move comes in an environment where the CAD is enjoying the benefit of a strong rebound in the price of oil and the AUD which has felt some pressure from weaker than expected Chinese data late last week. Economic data of interest to watch this week includes the Australian employment numbers on Thursday and Canadian inflation/retail data on Friday.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9914 0.9825 1.0125 0.9899 – 1.0097

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

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

Email:  

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

Market commentary:

The GBP will be in focus this week as we receive some of the first major economic indicators since the 23rd June UK vote to exit the EU. Data so far has included surveys and various estimates which point to a downturn, although data from the office of National Statistics this week should provide more tangible clues. Look for signs of upward price momentum in the inflation and producer price data when released later today, this as the pound’s near 12% trade weighted decline since the vote looks to drive up consumer prices and companies costs. Clues for any negative impact on the labour market come tomorrow via the jobless claims figures. Thursday’s retail sales numbers for July will give us evidence of the impact on domestic spending; an area which has so far proved quite resilient. Expect an interesting week with the GBP/USD sitting poised just above the Brexit 1.2796 lows.

Australia

The Australian dollar has opened this week in quiet fashion against the greenback after fading into last week’s end on the back of weaker than expected Chinese data that was released on Friday. The data dump included weaker than expected growth in Chinese retail sales, a decline in industrial production and falling investment and new lending. Local data last week was second tier in nature and failed to make any dent on trade. Releases included a decline in ANZ job ads and NAB business confidence which eased as it remained broadly in line with the long-run average. Consumer sentiment increased by 2% in August as optimists outweighed pessimists. Numbers on June housing finance approvals to owner occupiers showed a 1.2% rise, a pace which was half that expected, although annual growth was shown to be holding around 6.7%. Events on the economic calendar start today with the RBA minutes which are expected to reiterate the RBA’s views on expectations and risks to the economy. The highlight will be on Thursday as the July employment report is received which is expected to show a 10k gain in jobs for the month.

New Zealand

The NZD has started this week higher against the greenback on the back of support that has been seen for the commodity currencies overnight (on higher oil). Trade last  week was dominated by the fallout from the RBNZ’ OCR review on Thursday which saw the central bank cut interest rates as expected to 2.0% and the NZD rally in the hours following the statement. More easing was indicated as the RBNZ forecast subdued inflation at levels that won’t reach the 2% target until September 2018, some nine months later than that forecast in June. The RBNZ targeted the high NZD and its impact on tradable inflation (which has been negative for four years) as the key reason for the current low levels of inflation. Data released over the week included a small decline in the July food price index and business PMI indicator and much better than expected Q2 retail sales which surged 2.3% in real terms. REINZ house price data for July showed prices sitting 2.4% higher for the month and 16.3% higher than a year ago as low interest rates boosted house prices across all major regions. Of interest this week is the next in the GDT dairy auction series tonight (expected to show strong gains (+~10% for whole milk powder) and tomorrow’s household labour force employment survey.

United States

Last week was a relatively quiet one in the US which peaked with key data from the retail sector on Friday which showed spending stalling in July. The number was well below expectations, although revisions to prior numbers helped reduce its impact. Producer prices, which fell a seasonally adjusted 0.4% from a month earlier also disappointed as they registered their largest one-month fall since September 2015. The Michigan consumer sentiment and current conditions series also both failed to meet expectations. The data helped push expectations for a Fed hike at the next meeting down to near 15%. Data released earlier in the week highlighted the continuing trend of declining productivity and was joined by data on labour costs which were also worse than expected. Numbers released this week started with the NY Empire manufacturing index which disappointed, although expect a far greater impact from today’s inflation and building permits numbers (less so). Others items of interest include the FOMC minutes on Wednesday and Philly Fed manufacturing  index(Thursday). Various Fed members are also scheduled to speak.

Europe

Last week was a quiet one in Europe which saw the single currency etch out slim gains on the back of the lower greenback. Data released over the week was largely underwhelming and lightweight in nature. Releases included trade numbers from Germany which came in under expectations and industrial production data from France which also failed to meet the consensus. Inflation data from the key countries on the continent highlighted a continued weak inflationary environment. Euro area GDP data released on Friday remained unrevised from the first estimate at 1.6% y/y, whilst industrial production for the month of June at 0.6% was 1/10th of a percent above expectations. Look for a more interesting week this week which begins with ZEW economic sentiment indicators today. Euro area inflation reads on Thursday will precede the ECB policy meeting minutes which come shortly after, although expect the earlier US FOMC minutes to have had a greater impact.

United Kingdom

Pressure on the pound remains high this week ahead of key data which will give a more solid idea on the impact of the UK’s June 23rd decision to quit the EU. The numbers start with those on inflation tonight which are forecast to remain unchanged (at 0.5%) in July, this despite the GBP’s 12% decline since the vote (on a trade weighted basis). Producer prices (released at the same time) will be watched for pressure on companies costs as import prices look to reflect the impact of the currency’s move. Other data includes tomorrow’s July jobless claims and Thursday’s data on retail sales. Events last week included numbers from the NIESR which showed the UK economy contracting 0.2% in July. Manufacturing production data was marginally worse than expected in June, although revisions to earlier data saw the annualized figure fall well short of expectations. Industrial production was seen rising by a small margin, whilst the RICS house price indicator which fell to its lowest level since April 2013 displayed some of the impact of the waning post-Brexit buyer confidence.

Japan

Data out of Japan for this week was dominated by yesterday’s second quarter GDP release which came out much lower than expected at +0.2% q/q annualized, well short of the 0.7% expected. The numbers continued the jumpy, going nowhere trend that has been seen under Abenomics. These showed business spending once again dropped in the quarter in a move which followed the previous quarter’s 0.7% decline. Recent reports from Bloomberg indicate that the BOJ will become the top shareholder of 55 firms in the Nikkei 225 by the end of 2017. The report is based on the current rate of exchange traded fund (ETF) buying, which has come as the central bank doubled its annual ETF buying target last month in a move aimed at revitalizing Japan’s stagnant economy. The buying has drawn criticism from its opponents who say the buying is artificially inflating equity valuations and reducing incentives to make public companies more efficient. Data last week included core machinery orders that rose by more than expected in June and the latest current account which showed the smallest trade surplus since January. Look for further trade data on Thursday during what should be a quiet week overall this week.

Canada

Rallying crude oil prices continue to lend a hand to the Canadian dollar in trade this week. US crude futures rose to 3-week highs in trade overnight after the Russian energy minister Alexander Novak hinted that Russia could be open to having discussions with major producers from the Middle East in an attempt to coordinate joint oil market stability. The comments join those of the OPEC president last week which indicated a similar interest from OPEC major producing nations when they meet in Algeria next month. Canadian data last week lacked authority and failed to make any impact on trade. Indicators included a sharp drop in building permits and housing starts which maintained a positive trend, although fell from the month prior. Of interest this week is data on manufacturing sales later today although the main leads will come on Friday when we get numbers on inflation and from the retail sector.

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 »