NZD trading at the 0.7100 level; GBPUSD has fallen 19% since Brexit vote; Safe havens gold and yen rise as stocks across Asia fall

By Ian Dobbs*:

This week culminates in the inauguration of the President Trump on Friday but with US markets closed on Monday for Martin Luther King Day, we have already seen volatility kick-in early for Sterling. The pound tumbled on a report that U.K. Prime Minister Theresa May will signal plans to quit the European Union’s single market to regain control of Britain’s borders and laws in an upcoming speech on Tuesday. Safe haven assets from gold to the yen rose while stocks fell across Asia. Sterling declined as much as 1.6 % against the USD after The Sunday Times said that May will prepare to withdraw from tariff-free trade with the region in return for the ability to curb immigration and strike commercial deals with other countries. The pound pared losses after the U.K. Treasury was said to plan to calm investors after her speech on Tuesday and the Times of London reported Donald Trump would offer a quick trade deal to Britain when he assumes power. The British currency has now fallen 19 % against the US dollar since the nation opted to leave the EU in June’s referendum. The most recent declines have been driven by concern May would pursue a so-called hard Brexit.

Major Announcements last week:

  • Chinese Trade balance 275b vs 345b expected
  • US retail sales 0.6% vs 0.5% expected
  • University of Michigan Consumer Sentiment 98.1 vs 98.6 expected
  • UK inflation 1.4% vs 1.2% expected

NZD/USD

With US markets closed last night trading volumes were relatively light, the New Zealand dollar opens just above 0.7100 close to its close yesterday after a 0.7075-0.7145 range overnight. The New Zealand dollar continues to garner good support with any dip to the low 0.7000’s level picking up buying interest. Tone for the New Zealand dollar should remain firm over the coming days. Tonight’s dairy auction may provide further impetus for a breach of 0.7150, should it come in on the firm side as expected. This would open the way to target 0.7240 being the Dec 14th high.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.7100 0.7050 0.7150 0.6960 – 0.7146

NZD/AUD (AUD/NZD)

The New Zealand dollar raded in a narrow 0.9475-0.9515 (1.0554-1.0509) range agaisnt the Australian dollar overnight. It opens around 0.9495 and with the NZD holding firm and the AUD in a consolidative phase a move in this cross towards the 0.9550 is possible, look for  Australian jobs data and Chinese GDP later in the week to provide direction for any such move.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9495 0.9434 0.9524 0.9459 – 0.9555
AUD / NZD 1.0531 1.0500 1.0600 1.0466 – 1.0572

NZD/GBP (GBP/NZD)

Brexit woes continue to favour the New Zealand dollar on this cross, with choppy trading last night between 0.5866-0.5942 (1.7047-1.6829). The market has opened around 0.5897 (1.6958) and the NZD now has a target of 0.5988 (1.6700) last seen on 8th November. Tonight’s speech by PM May on her Brexit intentions could provide the catalyst. The market is expecting her to signal a ‘hard Brexit’ and this should keep the GBP under pressure in the near term.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.5895 0.5750 0.5980 0.5722 – 0.5938
GBP / NZD 1.6963 1.6722 1.7391 1.6840 – 1.7477

 NZD/CAD

The New Zealand dollar opens towards the top half of the overnight 0.9301-0.9377 range against the Canadian dollar at 0.9350, but no clear direction is evident. The Canadian dollar is expected to appreciate against the USD over the next week so this may push the NZD/CAD into the 0.9200 region but support at 0.9295 will have to break first.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9352 0.9290 0.9380 0.9220 – 0.9387

NZD/EURO (EURO/NZD)

The New Zealand dollar opens towards the top half of the overnight 0.9301-0.9377 range against the Canadian dollar at 0.9350, but no clear direction is evident. The Canadian dollar is expected to appreciate against the USD over the next week so this may push the NZD/CAD into the 0.9200 region but support at 0.9295 will have to break first.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.6694 0.6600 0.6807 0.6583 – 0.6720
EUR / NZD 1.4939 1.4689 1.5152 1.4881 – 1.5190

NZD/YEN

The New Zealand dollar continues to trade in a sideways pattern against the Yen, broadly within a 80.70-81.80 band.  Overnight levels ranged between 81.61-80.74 and it opens at 81.06. The JPY’s safe haven status has helped over the current hard Brexit fears, but once the UK PM’s speech is out of the way attention may turn back to the flat Japanese economic growth and the Bank of Japans policy around continued stimulus. We favour moves of the NZD back toward the top of the current range over the next week.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 81.02 80.50 82.00 80.73 – 81.91

AUD/USD

With much of the attention elsewhere around the weekend’s Brexit stories of a hard Brexit speech from PM May this week, the Australian dollar is largely consolidating, albeit with a bullish bias at the start of the week. It traded down yesterday to a low of 0.7457 but the uptick in Aussie inflation, up 0.5% in December, provided some support and it opens this morning at 0.7475. The bounce from around the 0.7450 support level indicates that the downside is limited and retracements are now being seen as buying opportunities. A breach of resistance at 0.7525 would clear the way for further advances toward the 0.7700 region.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7471 0.7450 0.7520 0.7334 – 0.7519

AUD/GBP (GBP/AUD) 

The Australian dollar continues to strengthen against the UK Pound. Overnight ranges were 0.6180 – 0.6245 (1.6179-1.6013) and it is currently trading around the 0.6209 (1.6104) mark. The next target is the Octoberr high of 0.6334 (1.5789), with the Brexit speech from the UK PM tonight and Chinese GDP data later this week we could see this level by the end of the week.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.6207 0.6175 0.6334 0.6033 – 0.6254
GBP / AUD 1.6110 1.5789 1.6195 1.5990 – 1.6575

AUD/EURO (EURO/AUD)

The Australian dollar has remained largely range bound against the Euro, albeit at elevated levels relative to where it was back in December. The 2016 high around 0.7105 (1.4075) is within sight and may well be tested later this week if Australian employment data come in on the strong side. From Europe there is a raft of second tier releases ahead of Thursday night’s ECB rate meeting.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.7045 0.6990 0.7105 0.6931 – 0.7075
EUR / AUD 1.4194 1.4075 1.4306 1.4135 – 1.4428

AUD/YEN

The Australian dollar continues to trade in a sideways pattern against the Japanese yen within a broad 84.90-86.20 band. A small range was seen overnight between 85.00-85.70 and it opens at 85.31. If the Aussie jobs data is solid we expect the AUD to be resilient on this cross and head back to the top of the band around 86.00/86.20. If a break of 86.20 is sustained next stop would be 87.20 last seen mid-December.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 85.27 85.00 86.20 85.06 – 86.26

AUD/CAD

The Australian dollar has spent much of January recovering previously lost ground against the Canadian dollar. The local currency remains well support trading just blow the weeks high. There is plenty to drive the pair over the coming days with the Bank of Canada rate statement, Australian employment data, Canadian inflation and Canadian retails sales all set for release.  For now the risks remain skewed to further Australian dollar strength. Any break above 0.9870 will encourage further AUD gains.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9843 0.9760 0.9870  

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

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

Email:  

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

Market commentary:

This week culminates in the inauguration of the President Trump on Friday but with US markets closed on Monday for Martin Luther King Day, we have already seen volatility kick-in early for Sterling. The pound tumbled on a report that U.K. Prime Minister Theresa May will signal plans to quit the European Union’s single market to regain control of Britain’s borders and laws in an upcoming speech on Tuesday. Safe haven assets from gold to the yen rose while stocks fell across Asia. Sterling declined as much as 1.6 % against the USD after The Sunday Times said that May will prepare to withdraw from tariff-free trade with the region in return for the ability to curb immigration and strike commercial deals with other countries. The pound pared losses after the U.K. Treasury was said to plan to calm investors after her speech on Tuesday and the Times of London reported Donald Trump would offer a quick trade deal to Britain when he assumes power. The British currency has now fallen 19 % against the US dollar since the nation opted to leave the EU in June’s referendum. The most recent declines have been driven by concern May would pursue a so-called hard Brexit.

Australia

The Australian dollar was among the best performers last week, up against the US dollar to 0.7518 and settling around 0.7500. The AUD/USD pair trimmed most of its December losses on the back of strong recovery in metals’ prices, as Chinese Trade Balance figures showed imports continued rising in the world’s second largest economy by the end of 2016, reassuring ongoing demand for Australian producers. However, ratings agency Fitch has revised its outlook for the Australian banking sector to negative amid concerns about rising household debt and pressures on the banks’ profits. The agency said its revised outlook reflected concerns about rising house prices, growing underemployment in parts of the economy and the impact on the banks from China’s worse-than-expected slowdown. This week the focus will be on employment data set for release on Thursday. The market is looking for a gain in employment of 10.2k with the unemployment rate remaining steady at 5.7%.

New Zealand

Last week was a quiet one for economic releases from NZ, but this week certainly provides more interest for the market. We have this morning seen the latest NZIER Business Confidence survey and it showed business confidence remained high with a reading of 28, up from the prior 26. This would indicate continued solid momentum in the New Zealand economy and that helps provide a buffer against unexpected events both locally and abroad. The survey also showed an improvement in pricing power for businesses which will be of note for the central bank as it may well suggest a pickup in inflation over the coming year. Tonight there is another Global Dairy auction and expectations are for a modest pickup in prices, which should help underpin support for the New Zealand dollar. Thursday then sees the release of building consents data which should remain largely unchanged from November. Of more interest will be the regional data, and in particular that of Auckland where consents have flattened off at a level below what is needed to keep up with population growth.

United States

The main data this week from the United States will be Wednesday’s December CPI figure. Following the election of Trump to the presidency, reflation and upside risks to the Federal Reserve’s 2.0%yr medium-term target have become a key discussion point amongst market participants. However we believe risks to their target are limited, with little likelihood of inflation running materially above 2.0%yr. That being said, results at or very near target are expected. As often noted during 2016, core inflation pressures are robust, with the core CPI currently at 2.1%yr. As the last of the oil disinflation washes out, headline inflation (at 1.7%yr in Nov) will tend to 2.0%yr. Critical to the inflation outlook remains the services sector. Rents have been and will remain a key support, and higher wages are also likely to add to inflation pressures. As such, gains of 0.2% for core prices will remain our base expectation. In Dec, oil will add to the headline result. Given the lead up to Friday’s inauguration, political events will also continue to have the ability to provide market swings.

Europe

News around Europe continues to be Brexit centric however data last week showed that industrial production in the Eurozone grew strongly in November. This suggests that the pace of economic activity in the Eurozone likely firmed a little at the end of last year. Specifically, industrial production (IP) in Germany rose 0.4 %t in November relative to the previous month. Although the outturn was not quite as strong as expected, the increase in October, which was originally reported to be 0.3 %, was revised up to 0.5 %. Italian IP rose 0.7 % in November and IP in France jumped 2.2 % during the same month. Both outturns were significantly stronger than most analysts had expected. There has been a disconnect in recent months between strength in “soft” data and lacklustre growth in “hard” data. Perhaps the “hard” data are finally beginning to catch up to the “soft” data. We are still sceptical that Eurozone economies have significantly turned the corner given that there continues to be a split in fortunes between the north and south European economies, lack of a convincing consistent uptrend and the political overhang of upcoming election. There is an ECB meeting on Thursday but even given the better data and higher inflation forecasts no big changes are expected.

United Kingdom

Brexit continues to dominate all issues around the Pound and the UK economy.  PM May’s speech on Tuesday is expected to show no wavering on the key elements of control over immigration and ‘freedom’ from the European Court of Justice. It is virtually impossible to see how the UK can remain in the EU Single market under those conditions and it seems likely PM May will concede as much, while also sticking to a timetable of triggering Article 50 by March. Although leaving the single market will be a substantial drag on economic growth in the coming years, the red lines matter more to the PM. The GBP took a knock yesterday but any significant move lower requires harder evidence of future economic weakness, we may see a short-covering bounce for GBP after May’s speech.

Japan

We have seen a mixed bag of data from Japan so far this week. Core Machinery Orders were weaker than expected, but this was offset by a better than forecast improvement in the Producer Prices Index. Bank of Japan Governor Kuroda was on the wires yesterday and he repeated his often used phrase that “Japan’s economy continues to recover moderately as a trend”. He added that Japan’s consumer inflation is likely to be slightly negative or around zero for the time being and that the Bank of Japan will adjust monetary policy as needed. There is little else scheduled for release from Japan over the rest of this week.

Canada

This week should prove and interesting one for Canada and the Canadian dollar with a number of key releases scheduled. Early on Thursday morning we have the Bank of Canada meeting and Monetary Policy Report. The market isn’t expecting any change in interest rates at this stage as the Canadian economy appears to be stronger than the BoC had expected it to be at this point. Inflation however is still well below their target rate and so the central bank won’t be completely comfortable. Also to draw focus later in the week we have manufacturing sales, inflation data, and retail sales numbers.

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 »