Brexit polling and central bank meetings the focus for the market; prospects for dismantling of euro currency project if UK leaves EU; elevated volatility only sure bet this week

By Ian Dobbs*:

Elevated volatility in the markets looks about the only sure bet this week ahead of key central bank meetings from the US the UK and Japan.

Adding to the uncertainty are the frequent polls coming out of the UK, many of which have recently pointed to solid leads for those in favour of the UK leaving the EU.

The polling has turned the focus on the fragility of the global economic story and the prospect of a wider fall-out should the UK choose to go it alone.

The risk of a UK exit ushers in the prospect of other European countries choosing to give their voters the chance to join Britain in leaving down the track, raising the prospect of an EU break-up and dismantling of the single currency project.

Scheduled central bank meetings add to the interest during the week although current expectations are for no moves from either of the US Fed, BOJ and BoE.

Major Announcements last week:

  • Australian cash rate, on hold at 1.75% as exp.
  • EU Q1 GDP, 0.6% q/q vs. 0.5% exp.
  • Canadian Ivey PMI, 49.4 vs. 51.5 prior (May).
  • Japan Q1 GDP, 0.5% q/q as exp.
  • UK Manufacturing Production, 2.3% m/m vs. 0.0% exp (Apr.)
  • NZ cash rate, on hold at 2.25% as exp.
  • US Initial Jobless Claims, 264k vs. 270k exp. (Week to 3 June).
  • Canadian Employment, 13.8k vs. 3.8 k exp. (May).
  • Canadian Unemployment rate, 6.9% vs. 7.1% exp. (May).
  • US Reuters/Michigan Consumer Sentiment, 94.3 vs. 94.0 exp. (June).

NZD/USD

Recent trade in the NZD has seen it retrace some of last week’s impressive rally which took it to highs against the USD not seen in over year. Souring global risk sentiment has dominated the flow since our report on Friday and comes as investors fret over political uncertainty in the US and in Europe/UK. Externals factor such as these will have a high impact on the NZD this week although the Q1 GDP release on Thursday has the potential to spark some activity. Other focus will be on US data and the FOMC meeting on Thursday morning (NZ time). Resistance lies around last week’s highs whilst support is noted in the .6940/60 zone. We anticipate current levels being near mid range of our expectations for the next week or so.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7041 0.6940 0.7160 0.6894 – 0.7147

NZD/AUD (AUD/NZD)

The New Zealand dollar has eased against the Australian since our report on Friday. The pull-back comes after last week’s large rally which saw the cross hit highs last seen in May last year. The move was largely RBNZ inspired although was compounded by easing commodity prices towards the end of the week. NZ GDP and the Australian employment report are the key events to watch this week. We favour a further retracement after last week’s large advance and favour buying AUD over NZD at current levels.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9530 0.9485 0.9600 0.9313 – 0.9607
AUD / NZD 1.0493 1.0417 1.0543 1.0409 – 1.0738

NZD/GBP (GBP/NZD)

The New Zealand dollar has advanced further against the UK pound since our last report. Once again the gains have been driven by the spectre of a UK exit from the EU after the latest polls have continued to show a lead by those in favour of the UK leaving the EU. Polling will again be pivotal this week whilst on the economic front events to note include NZ GDP, UK inflation today, UK employment tomorrow and the BoE meeting/UK retail sales on Thursday. Buying dips continues to be our favoured option ahead of the referendum although making calls on this cross is a lottery running into the 23rd referendum.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.4955 0.4900 0.5010 0.4725 – 0.5007
GBP / NZD 2.0181 1.9960 2.0408 1.9971 – 2.1164

 NZD/CAD

The New Zealand dollar has eased against the Canadian dollar since our commentary on Friday. Moves have been contained within a .8970/.9070 range since the report and come as the NZD has eased on the back of ‘risk’ selling whilst the CAD has eased on the back of a retracement in the oil price. These types of external risks are making this cross difficult to call although for now recent momentum points to the upside. Data events to consider for the cross this week include the NZ Q1 GDP report on Thursday and Canadian inflation numbers on Friday.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9032 0.8970 0.9100 0.8850 – 0.9093

NZD/EURO (EURO/NZD)

The New Zealand dollar has eased against the Euro since our commentary on Friday. The retracement on the back of last week’s RBNZ inspired gains comes as the market looks to lighten on ‘risk’ currencies as political and economic uncertainty heightens ahead of the UK EU referendum. Economic events to watch this week includes NZ GDP on Thursday and next in the GDT dairy price series. In reality however it looks to be external drivers that will have the greatest influence this week. Momentum for now has again turned the focus to the downside and has us marginally favouring selling rallies on the week.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6237 0.6200 0.6330 0.6071 – 0.6311
EUR / NZD 1.6034 1.5798 1.6129 1.5846 – 1.6471

NZD/YEN

A strong deterioration in risk sentiment has seen the New Zealand dollar reverse most of last week’s gains against the Yen since our report on Friday. The change in sentiment comes on the back of political concerns in the UK/Europe as polls on Friday continued to point to a strong chance of the UK leaving the EU. This has seen global equities fall in recent trade as the market’s considers the wider economic consequences and the risk of contagion. Demand for the ‘safe haven’ yield is typically elevated during these periods and this ‘risk/safe haven’ dynamic has once again hit the NZD/JPY cross particularly hard. Focus this week will continue to be on this issue whilst on the economic front Thursday looms as the most important day of the week with the NZ Q1 GDP report and BOJ interest rate decision both due.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 74.80 73.50 76.40 74.09 – 79.36

AUD/USD

The Australian dollar has eased in trade since Friday against the USD. The move comes in an environment where the market has sold ‘risk’ currencies like the AUD in the wake of Friday’s polls in the UK which showed an increasing lead for those in favour of the UK leaving the EU. The risk of contagion and financial market turbulence has the market reflecting on the outlook for global growth during this period of heightened political uncertainty. Expect the external environment to have a considerable impact on this pair again during the week especially given the busy US data calendar over the week. Australian numbers are dominated by the employment report on Thursday. We cautiously favour buying dips for now although expect volatility to remain high.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7385 0.7350 0.7510 0.7360 – 0.7503

AUD/GBP (GBP/AUD) 

The Australian dollar has continued to advance against the UK pound in trade since Friday. Brexit polling remains the dominant influence on volatility in this cross and will continue to remain so until after the referendum. The latest polling ushered in the recent highs in the cross yesterday, this level through to .5250 (1.9048) is the first level of resistance for the cross. Look for more volatile trade this week given the polling and economic calendar which starts with numbers on UK inflation today. Other data includes employment indicators from both countries, retail sales in the UK and the latest BoE monetary policy decision.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.5197 0.5165 0.5250 0.5039 – 0.5244
GBP / AUD 1.9240 1.9048 1.9361 1.9070 – 1.9845

AUD/EURO (EURO/AUD)

The Australian dollar has eased in recent trade against the Euro. The move comes on an easing in ‘risk’ currencies like the AUD and NZD on the back of heightened political concern, economic uncertainty and contagion as polling on the UK EU referendum points to a strong possibility of a UK exit from the EU. This issue will continue to have a strong influence on the cross this week given the relatively light data calendars from both regions which will be dominated by the Australian employment report on Thursday.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6542 0.6500 0.6580 0.6483 – 0.6580
EUR / AUD 1.5287 1.5198 1.5385 1.5197 – 1.5425

AUD/YEN

The Australian dollar has fallen against the Japanese Yen since our commentary on Friday. The move comes as the market looks to the safely of the JPY and averts the riskier currencies like the AUD in the wake of Friday’s polling on the UK EU referendum. The risk of a UK exit from the EU has the market concerned over the wider implications for the financial markets and country membership in the EU, issues which cloud the global economic landscape. Scheduled events for the cross to consider this week are the Australian employment report and BOJ monetary policy meeting on Thursday. Support is seen at 78.00, momentum and the bigger picture techs point to lower levels ahead, especially should 78.00 cleanly break. Next support looks distant at around 74.50.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 78.44 78.00 80.80 78.11 – 80.29

AUD/CAD

The Australian dollar has firmed slightly against the Canadian dollar since our last report on Friday. Levels below .9400 traded into the end of last week on the back of the easing in the AUD/USD as investors averted riskier currencies like the AUD in the wake of fresh UK polls on the EU membership referendum. Subsequent gains have been seen this week on the back of the CAD which has been marked lower on softer oil prices. Look for these types of external factors to again play a significant role this week. Local data events include Australian employment on Thursday and Canadian inflation on Friday.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9473 0.9390 0.9540 0.9391 – 0.9545

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

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

Email:  

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

Market commentary:

Elevated volatility in the markets looks about the only sure bet this week ahead of key central bank meetings from the US the UK and Japan. Adding to the uncertainty are the frequent polls coming out of the UK, many of which have recently pointed to solid leads for those in favour of the UK leaving the EU. The polling has turned the focus on the fragility of the global economic story and the prospect of a wider fall-out should the UK choose to go it alone. The risk of a UK exit ushers in the prospect of other European countries choosing to give their voters the chance to join Britain in leaving down the track, raising the prospect of an EU break-up and dismantling of the single currency project. Scheduled central bank meetings add to the interest during the week although current expectations are for no moves from either of the US Fed, BOJ and BoE.

Australia

The AUD closed trade on a weaker note against the USD on Friday. Gains from earlier in the week moderated on the back of ‘risk’ selling. This took place in offshore trade as the market grappled with the increased political uncertainty which was headed by another poll in the UK which showed a decent lead in the ‘leave’ vote in the EU membership referendum. Geopolitical tensions remain in the markets focus as the IMF warned of the potential for contagion and a severe market reaction should the UK choose to leave whilst in the US shootings in Florida yesterday added fuel to the ISIS debate in the race for the US presidential election. Concerns over the corporate debt pile in China have raised comments from the IMF this week and came as data on fixed asset investment yesterday missed analyst estimates. Domestic events in Australia last week were headed by the RBA rate decision which like their NZ counterparts later in the week saw the central bank leave rates on hold. Local data was sparse but included a rise in ANZ jobs ads and housing finance, whilst finance approvals fell from the month prior. Data this week starts with numbers on business confidence today although most of the attention will be on Thursday’s US FOMC statement and Australian employment data.

New Zealand

The large NZD gains against the USD seen earlier in the week were trimmed by the close of trade on Friday. Market volatility and ‘risk-off’ positioning dominated trade offshore on Friday as investors sought the relative safety of currencies like the CHF, JPY and USD. Sharply weaker global equity bourses and mounting geopolitical concern drove investor sentiment into the end of the week. Uncertainty took a boost on the back of an opinion poll in the UK which showed a sizeable lead for the ‘leave’ camp in the upcoming UK EU referendum. The EU has expressed concern that an exit may lead to referenda in other EU countries on the issue as EU membership debates and low EU favourability polling blight the European political landscape. Local news last week was dominated by the decision of the RBNZ which chose to hold rates at 2.25%. Pressure from the housing market was seen as a key reason for the more hawkish than expected commentary that was issued by the central bank. Data of interest was minimal and included a lower Q1 survey of manufacturing and electronic card retail sales which eased from the month prior. Events this week look likely to be heavily influenced by offshore sentiment once again. The Q1 current account is due tomorrow and will be followed by the Q1 GDP release and US FOMC meeting on Thursday. The next in the GDT dairy auction series is also due for release.

United States

Last week was a very quiet one in the US which saw sentiment being dictated by the previous Friday’s poor employment release that saw investors significantly downgrade their estimates for US rate hikes in 2016. Key data releases which were sparse included a rise in JOLTs jobs openings and unexpected fall in jobless claims for the week to June 3rd. Friday saw the release of the latest Michigan consumer sentiment survey the highlight of which was a drop in the 5-10 years inflation expectations which fell to an all-time low. Trade in the USD on Friday was dominated by inflow on the back of concern over rising political uncertainty across the Atlantic as new polls showed an increasing possibility of the UK leaving the EU. The news and potential for wider contagion saw global equities retrace on the day and again during trade overnight. This week will be a busy one in the US. Retail sales will feature today and comes ahead of tomorrow’s FOMC meeting statement. Expectations for a move in rates are minimal although the new dot plot and press conference could be informative. Other releases which are numerous include numbers on May inflation on Thursday.

Europe

A lack of incoming data has seen the Euro take its leads from external influences in recent trade. Uncertainty provided by the debate on the UK membership in the EU continues to plague sentiment in Europe as the market looks to the wider implications for other countries who may also consider their EU stance. The political uncertainty comes during a time of increased political tension in the US presidential race and as concerns over the Asian economies increase. These issues have seen the EUR ease recently as the investors chase the relative safety of the USD and JPY. Data out of Europe last week was sparse. The Q1 GDP euro-area final estimate lifted moderately whilst the latest German and Spanish industrial production numbers beat their consensus estimates. Interest this week will come in the form of euro-zone industrial production today and inflation numbers on Thursday. Euro-zone current account and wages numbers will hit the wires on Friday although most of the focus will be on events in the US (and the UK) which include the FOMC meeting outcome on Wednesday.

United Kingdom

Polling on the issue of the UK membership in the EU has dominated flow in the GBP since our report on Friday. The theme which has been a familiar one will continue to dominate news in the lead-up to the 23rd June referendum. Latest polls included one from the Independent which showed the Brexit camp having a 55% tally and a later one from the Guardian/ICM which also showed a lead (although smaller) by the ‘leave’ camp. The polling has seen the GBP plump lows not seen since mid April and has helped push the UK FTSE stock index 4.4% lower from its recent highs. Concern is also high over the possibility of other countries in the EU having their own referenda on the issue and comes at a time of elevated political uncertainty across the US and Europe. Data last week in the UK which was largely positive failed to make any impact on investor sentiment. Manufacturing and industrial production both beat their estimates whilst the latest Halifax house price numbers managed to maintain a higher than expected rate of annual growth. April trade saw a marginal gain on the month prior whilst the latest NIESR GDP estimate also managed a modest improvement. Focus for this week starts with May inflation today which will be followed by numbers on employment tomorrow. Thursday will see the BoE MPC meeting outcome and give us the latest read on UK retail sales.

Japan

Market volatility which saw the VIX index trade to 3 month highs this week has provided fertile ground for JPY strength in recent trade. Falls in global equity bourses since our report on Friday has seen demand for the ‘safe haven’ JPY lift and come as the market grapples with increased concern over the potential for the UK to leave the EU. Polls which in recent days have indicated a lead for the ‘leave’ camp come as the market fears wider referenda on the issue across the EU. Data out of Japan last week included Q1 GDP numbers which rose in line with the consensus and bank lending that met last month’s gain. The latest current account numbers disappointed whilst machinery orders numbers for April were seen falling heavily from the month prior. Data this week starts with the capacity utilization and industrial production numbers this afternoon although local focus for the week will be on the BOJ monetary policy meeting outcome on Thursday.

Canada

An easing in the price of oil in recent sessions has placed pressure on the CAD gains which were seen initially last week. Economic concerns over the fallout from a Brexit and concerns over Asia’s economy have helped lift demand for the USD. These factors and a lift in the latest US oil rig count helped cap oil’s recent strong rally. Economic data out of Canada last week was largely disappointing although finished the week on a positive note after the latest employment data beat expectations. Jobs added in May beat the consensus by 10k whilst the unemployment rate fell 0.2% to 6.9%. Earlier releases were mainly disappointing however. They included the Ivey PMI which joined the latest housing starts and building permits numbers in underperforming expectations, although new house prices rose slightly more than expected. Inflation numbers on Friday are the main local event of note this week, other key focus will be the US FOMC meeting 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 »