Aussie joins the fragile political environment party; another UK political figure sidesteps the UK EU backlash by resigning; UK businesses trying to stall exit from EU; other EU countries want own referendum on membership

By Ian Dobbs*:

Australia has joined the ranks of those countries with a fragile political environment after this weekend’s Australian election.

The prospect of a hung parliament and a significant period of political uncertainty based around a minority government and unmanageable Senate could reduce the ease of passing legislation and potentially delay the return of a budget surplus.

In the UK the political landscape continues to deteriorate after the UKIP leader Nigel Farage (a prominent Brexit campaigner) yesterday joined the ranks of those wanting to step back from the UK EU exit backlash.

Meanwhile a group of UK businesses are reportedly preparing a legal challenge to force the government to delay negotiations with the EU until an act of parliament is in place in a move which is aimed squarely at the majority of MPs which were in favour of the UK remaining in the EU.

Things look little better across the English channel after a recent Ipsos-MORI survey found that almost half the voters in eight big EU countries wish for their own referendum on EU membership.

Major Announcements last week:

  • US Markit PMI Composite, 51.2 vs. 50.9 exp. (June)
  • US Q1 GDP, 1.1% vs. 1.0% exp.
  • Australian HIA New Home Sales, -4.4% m/m vs. -4.7% prior (May)
  • NZ Building Permits s.a., -0.9% m/m vs. 6.8% prior (May)
  • Japanese Industrial Production, -2.3% m/m vs. -0.1% exp. (May)
  • NZ ANZ Business Confidence, 20.2 vs. 11.3 prior (May).
  • Australian Private Sector Credit, 0.4% m/m vs. 0.5% prior (May).
  • UK Q1 GDP, 0.4% on exp.
  • EU Core Inflation, 0.9% y/y vs. 0.8% exp. (June)
  • Canadian GDP, 0.1% m/m on exp. (Apr.)
  • US Chicago PMI, 56.8 vs. 50.7 exp. (June)
  • US ISM Manufacturing PMI, 53.2 vs. 51,5 exp. (June)

NZD/USD

The New Zealand dollar continues to track higher in trade against the USD this week. The move reflects a continuation of the positive mood which developed for risk last week and comes as the market looks to embrace yield currencies and those deemed to have a reduced exposure to the UK/European political situation. Look for offshore events to dictate trade this week. Data of interest in the US is headed by the employment release on Friday. We favour taking advantage of the extended NZD rally to buy USD currently, although note NZ’s favourable standing given the low likelihood of US rate hikes and political uncertainty in many countries abroad.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7206 0.7150 0.7300 0.7010 – 0.7241

NZD/AUD (AUD/NZD)

The New Zealand dollar remains in strong demand against its Australian counterpart after the weekend’s Australian election. The ballot introduced further uncertainty into the Australian political landscape as the result will likely see minor parties holding the balance of power once all the votes are counted. Look to events this afternoon (headed by the RBA cash rate decision) to induce additional volatility. Key support remains at .9480 (1.0549 resistance), whilst on the topside resistance levels nearby are hard to find although yesterday’s highs ahead of .9630 (1.0384) is the first level to watch. We expect the NZD to remain in demand until the Australian political situation becomes clearer.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9575 0.9480 0.9630 0.9524 – 0.9632
AUD / NZD 1.0444 1.0384 1.0549 1.0382 – 1.0500

NZD/GBP (GBP/NZD)

The New Zealand dollar continues to march higher against the UK pound in trade this week. The move reflects the relative safety of the high yielding NZD when viewed against the prospect for the GBP, which is likely to suffer from protracted economic and political uncertainty and lower rates post the EU vote. We see little likelihood of change and favour buying NZ dollar dips in this cross in reaction to any correction/profit taking. UK events form the focus this week and start with the BoE Financial Stability report and a speech from the BoE Governor Mark Carney today.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5432 0.5330 0.5650 0.5258 – 0.5448
GBP / NZD 1.8409 1.7699 1.8762 1.8357 – 1.9020

 NZD/CAD

The New Zealand dollar has continued to edge out gains against the Canadian dollar since our report on Friday. The move comes in a still supportive environment for risk and as investors look to currencies that have a reduced exposure to the uncertain UK/European political situation. Look to oil and risk/non-UK/EU sentiment for direction this week in the lead up to the US employment data on Friday. We are unsure on immediate direction this cross. For now the momentum is higher although the ~7.8% rally since the late April lows looks appealing for CAD buyers.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9278 0.9060 0.9320 0.9161 – 0.9304

NZD/EURO (EURO/NZD)

The New Zealand dollar has continued to rally against the Euro in trade since Friday. Demand for currencies with a reduced exposure to the uncertain political and economic landscape in the UK and EU post the Brexit vote continues to drive the shift in this cross. We see little prospect of a reversal in this sentiment in the near future (although note the risk of renewed share market volatility). This has us favouring buying any NZ dollar dip again this week.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6472 0.6350 0.6695 0.6352 – 0.6499
EUR / NZD 1.5451 1.4937 1.5748 1.5388 – 1.5743

NZD/YEN

The New Zealand dollar has continued to edge higher against the Japanese Yen since our last report. The move comes in an environment that remains supportive for risk/equities (for now) and as investors look to currencies like the NZD in recent trade that have a relatively high yield and reduced exposure to the UK/Europe. Look for these issues to again hold sway this week given the light event calendar’s due from both countries. We favour buying the JPY over the NZD, although for now the momentum in the pairing is NZ dollar positive.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 73.79 71.00 75.00 71.29 – 74.27

AUD/USD

The Australian dollar has continued to rally against the USD since our report on Friday. The move comes despite the prospect of a hung parliament after the Australian election at the weekend as investors continue to look to those currencies that have a reduced exposure to the unfolding train wreck in the UK and Europe and offer yield. Yield forms the focus for the AUD today as the markets looks to the RBA announcement this afternoon for clues on the direction of rates in the months ahead.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7522 0.7435 0.7650 0.7344 – 0.7544

AUD/GBP (GBP/AUD) 

The Australian dollar has continued to move higher against the UK pound since our last report. The move comes despite the current political uncertainty in Australia after the weekend’s election, although when viewed against what is the mess of the UK political/economic landscape post the EU vote the issues for Australia look miniscule. Events today starting with the RBA cash rate statement will be important for the cross this week. Also look to the BoE Financial Stability Report and speech from Governor Carney for fresh influence from the UK. We continue to favour buying AUD dips in this cross.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5670 0.5500 0.5800 0.5497 – 0.5682
GBP / AUD 1.7637 1.7241 1.8182 1.7599 – 1.8192

AUD/EURO (EURO/AUD)

The Australian dollar has continued to rally against the Euro since our report on Friday. The move comes as the market overlooks the prospect of a hung Australian parliament in favour of currencies with a reduced exposure to the unfolding crisis in the UK and Europe. Look to the RBA cash rate announcement this afternoon for immediate direction in this cross. We favour buying AUD dips this week as the market remains focussed on the Brexit issue.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6755 0.6650 0.6800 0.6647 – 0.6773
EUR / AUD 1.4803 1.4706 1.5038 1.4765 – 1.5044

AUD/YEN

The Australian dollar has edged higher against the Japanese Yen in trade since our report on Friday. The move, which comes despite the prospect of a hung parliament after the weekend’s Australian election, reflects the (currently) supportive environment for those currencies which are both higher yielding and have a reduced exposure to the unfolding events in the UK and Europe. Look to today’s RBA cash rate statement for further incite on the yield appeal of the AUD whilst again look to international markets to dictate the mood on risk over the week. We favour buying JPY around current levels.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 77.02 75.40 77.50 74.73 – 77.40

AUD/CAD

The Australian dollar has continued to lift against the Canadian dollar since our report on Friday. The move reflects a currently supportive environment for risk (for the time being) and the appeal of the AUD in light of the highly uncertain environment in the UK and Europe. Momentum for the cross remains positive at present, although this may change should the RBA spring a surprise at today’s monetary policy meeting. Look to oil prices for CAD influence although for now prices are relatively stable.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9684 0.9580 0.9760 0.9587 – 0.9696

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

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

Email:  

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

Market commentary:

Australia has joined the ranks of those countries with a fragile political environment after this weekend’s Australian election. The prospect of a hung parliament and a significant period of political uncertainty based around a minority government and unmanageable Senate could reduce the ease of passing legislation and potentially delay the return of a budget surplus. In the UK the political landscape continues to deteriorate after the UKIP leader Nigel Farage (a prominent Brexit campaigner) yesterday joined the ranks of those wanting to step back from the UK EU exit backlash. Meanwhile a group of UK businesses are reportedly preparing a legal challenge to force the government to delay negotiations with the EU until an act of parliament is in place in a move which is aimed squarely at the majority of MPs which were in favour of the UK remaining in the EU. Things look little better across the English channel after a recent Ipsos-MORI survey found that almost half the voters in eight big EU countries wish for their own referendum on EU membership.

Australia

The political landscape is dominating the headlines in Australia this week after the weekend’s Federal election. The result currently points to the strong prospect of a hung parliament when all the votes are counted, with both the ruling Liberal/National Coalition (LNP) looking likely to be unable to govern alone. The prospect of a period of political uncertainty and a Senate which includes a number of minor political parties and independents is likely to weigh on market confidence if key legislation becomes more difficult to pass. The deadlock has already seen key rating agencies move to warn of a credit rating downgrade on the back of the difficulty that a minority government may have in returning the country to a budget surplus. The result saw the AUD open lower initially this week although the fall proved short lived as investors chased yield and ex-Europe currency exposures. Last week’s data had no impact on the markets. The releases included a fall in HIA new home sales and a smaller than expected rise in fresh credit issued to consumers and businesses. In focus this week is today’s RBA meeting where economists expect no move in rates despite Australia’s uncertain political future and the fallout from Britain’s vote to leave the EU. Numbers on trade and retail come three hours earlier in what will be the busiest day this week.

New Zealand

Improving sentiment brought about by a rebound in global equities and a move into currencies with a reduced exposure to the turmoil in the UK/Europe has helped lift the New Zealand dollar in recent trade. Local data events last week took a back seat to the improved sentiment which tracked the course of stronger global equity markets. Trade data for May improved from the month prior, although building permits (for May) issued fell sharply from the month prior. Business confidence for the same month lifted to six-month highs on the back of strength in the construction and tourism sectors. The latest quarterly NZIER business confidence survey released this morning also reflected an improving outlook amongst respondents with a net 19% expecting an improvement over the next quarter. Other data this week includes the next in the GDT dairy price series due for release tonight, although once again look to offshore for direction overall.

United States

Holiday trade has meant a quiet start for the USD this week. External events dominated last week as focus remained squarely on the UK and Europe as the heightened uncertainty saw the market price out the prospects of Fed rate hikes until 2018. Data last week from the US was mixed and included misses in the services PMI, Dallas Fed and pending home sales numbers, amongst others. Positive reads included an upwards revision in the Q1 GDP data, consumer confidence- which lifted to eight month highs and strong prints from both the Chicago PMI and manufacturing ISM report. The highlight this week is the employment data on Friday where a strong rebound from last month’s weak number is expected (190k exp.). The minutes of the June Fed meeting feature on Thursday and will be examined for key issues (although will reflect a view prior to the UK EU vote).

Europe

Trade in the Euro continues to take its lead from discussion and headlines on the Brexit issue this week. Stresses on the Italian banking sector and Portugal’s budget deficit are garnering increased attention as investors contemplate the fallout on Europe from the UK’s vote and look to weak links in the Eurozone. The possibility of a complete EU break-up remains of concern and comes as a survey suggests that almost half the voters in eight large EU countries want their own referendum on membership. Data last week understandably had little bearing on proceedings. German retail sales was seen beating expectations, whilst inflation across the Eurozone was seen coming in slightly higher than the consensus. Manufacturing PMI data released on Friday managed to edge the consensus in both Germany and across the wider euro area whilst sentix investor confidence released yesterday fell well short of expectations. Events this week to watch include a speech from ECB president Draghi tomorrow and indicators on the composite and services PMI today.

United Kingdom

Politics of the Brexit vote continue to dominate focus in the UK this week. The latest news comes as Nigel Farage, leader of the UK Independence Party and a prominent campaigner for a UK exit announced his resignation yesterday. The move follows that of PM Cameron (resigning) and ex London mayor Boris Johnson, who both moved to dodge poll positions in the UK EU negotiations as the fallout from the vote continues to intensify. Despite the political turmoil the UK share market rebounded last week to trade at its highest level for the year as the market reacted to a falling pound and prospects of fresh BoE easing. Data released during the week included the final read on Q1 GDP which matched the prior estimate and credit numbers which saw a rise in mortgage approvals and mortgage lending (May). Data released yesterday showed the construction PMI tumbling in June as forward order books plunged. The survey which was 80% completed prior to the UK EU vote intensifies the concern over how much the construction sector will be impacted by the Brexit vote. In focus this week is today’s BoE Financial Stability report and Governor Carney’s speech. Data releases include the services PMI (today) and numbers on manufacturing and industrial production on Thursday.

Japan

Sentiment shown towards the Yen remains firm in trade this week in the wake of the UK’s EU exit vote. There have been few fresh leads since Friday with the US on holiday yesterday and the local data wrap lacking. Last week was a busy one for Japanese data although none of the releases caused any stir. Retail sales and the first read on industrial production both slumped from the month prior, although positive surprises came from the housing starts and construction numbers. Vehicle sales posted a moderating rise from that seen a month earlier. Consumer confidence which beat expectations, posted a gain from that seen in May. National inflation data for the same month saw prices fall 0.4% y/y which was a touch smaller than the decline expected. The BOJ Q2 Tankan survey revealed large manufacturers generally slightly more positive than expected, although a large number of the participants had responded prior to the UK’s vote on EU membership. Look to international markets for moves in the Yen this week once again. Data releases include numbers on bank lending and the May current account, which are both due on Friday.

Canada

The Canadian dollar has edged higher in quiet trade this week which has started with the release of the BoC Business Outlook Survey and RBC Manufacturing PMI for June. The latter came in slightly lower than last month’s print, whilst the BoC survey revealed participants who expected generally soft business activity ahead with flat sales as company export sales and labour-market slack remained key features in the economy. A large divergence was noted between the oil and services sector as the former maintained tight capital spending plans and noted dim prospects ahead. Data releases from last week included the April GDP report which failed to fire after it matched expectations whilst raw materials prices for May were seen expanding by more than the market forecast. Looking out to later in the week we have trade data on Wednesday, building permits and the Ivey PMI on Thursday which come prior to the arrival of the latest employment figures on Friday.

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 »