Negative interest rate announcement in Japan catches market off guard; US Fed dials back rate hike expectations; NZD trading with a firm tone

By Ian Dobbs*:

The Bank of Japan (BOJ) delivered a real surprise to markets on Friday afternoon with further monetary easing.

The move to negative interest rates was not expected and as a result the JPY lost significant ground across the board. The BOJ are the latest in a string of central banks so far this year to either ease outright, or signal further easing’s are coming.

The ECB did just that a couple of weeks ago and last week the RBNZ did the same adopting a strong easing bias.

In the US the Fed have recently dialed back expectations for future rate hikes and the market is now only pricing in slightly more than one interest rate hike this year.

Attention now turns to the Reserve Bank of Australia (RBA) who release their rate statement this afternoon. However, the market may be disappointed if they are expecting too much of a change in stance from the RBA’s current ‘on hold’ position.

The Australian central bank will likely acknowledge the weaker global outlook, but domestically we have seen decent data from Australia recently, in particular that of employment and inflation.

Major Announcements last week:

  • German Business Climate  IFO, 107.3 vs. 108.4 exp.

  • US Consumer Confidence, 98.1 vs. 96.5 exp. (Jan).

  • Australian Q4 inflation, 0.4% vs. 0.3% exp.

  • US FOMC, on hold, reducing market rate hike expectations.

  • NZ Cash rate, on hold 2.5%, easing bias.

  • UK Q4 GDP, 1.9% y/y as exp.

  • US Durable goods orders, -5.1% vs. -0.6% exp. (Dec.)

  • BOJ Interest rate decision, -0.1% vs. 0.1% exp.

  • US Q4 GDP, 0.7% ann. vs. 0.8% exp.

  • Canadian GDP, 0.3% as exp. (Nov.)

  • US Chicago PMI, 55.6 vs. 45.0 exp. (Jan).

NZD/USD

The New Zealand dollar is trading with a firm tone in present trade against the USD and sits near highs traded nearly two weeks prior. This comes on the back of continued soft U.S data flow overnight and reductions in USD long positioning after last week’s more cautionary U.S. FOMC statement. Tomorrow will be a key day for the NZD/USD with dairy pricing, employment data and a speech by the RBNZ Governor all due to arrive. The immediate challenge for the NZD/USD beyond .6560 lies around the .6600 level, whilst support is seen in the broad .6420/50 zone for now.

DIRECT FX Current level Support Resistance Last wk range
NZD / USD 0.6535 0.6420 0.6600 0.6419 – 0.6558

NZD/AUD (AUD/NZD)

The New Zealand dollar has staged a rally against the Australian dollar in recent hours ahead of the very important next 36 hour period for this cross. This period includes the release of the next GDT dairy price auction, NZ Q4 employment data, and firstly the RBA cash rate meeting this afternoon. Pricing for the NZD took a hit last week after the more dovish than expected RBNZ monetary policy meeting commentary and marginally better than expected Australian inflation data. Friday will also be important for this cross with both Australian retail sales and the RBA statement on monetary policy due for release. We favour selling NZD rallies for now, but note the much higher than normal uncertainty due to the heavy weight of incoming data.

DIRECT FX Current level Support Resistance Last wk range
NZD / AUD 0.9205 0.9110 0.9225 0.9117 – 0.9301
AUD / NZD 1.0864 1.0840 1.0977 1.0751 – 1.0968

NZD/GBP (GBP/NZD)

The New Zealand dollar is drifting against the U.K. pound in current trade, although sits lower than the highs seen since our report on Friday (~.4570, 2.1882). The slide observed since these highs was aided overnight by the better than expected U.K. manufacturing PMI data ,although this move has been tempered in recent hours by the sharp lift in the NZD/USD exchange rate. Moves in the next 36 hours should be dictated by NZ events (dairy pricing, employment, and the RBNZ Governor speech); Friday’s BOE meeting should pass without too much concern given present expectations.

DIRECT FX Current level Support Resistance Last wk range
NZD / GBP 0.4535 0.4450 0.4580 0.4488 – 0.4581
GBP / NZD 2.2051 2.1834 2.2472 2.1830 – 2.2282

 NZD/CAD

The New Zealand dollar has lifted against the Canadian dollar so far this week and comes after the surge higher in the NZD/USD exchange rate seen overnight that outpaced the stronger CAD, which managed to rally despite lower oil prices overnight. The trend for this cross is lower and has been in place since late 2015, this has us favouring selling rallies although we note the heavy NZ event risk over the next 36 hours which includes the latest GDT dairy price auction release, the Q4 employment data and a speech by the RBNZ Governor. Better resistance beyond .9150 lies around .9240.

DIRECT FX Current level Support Resistance Last wk range
NZD / CAD 0.9125 0.9000 0.9150 0.9034 – 0.9234

NZD/EURO (EURO/NZD)

The New Zealand dollar has firmed in recent trade against the Euro and has (somewhat surprisingly) reversed all of the losses seen last week after the RBNZ opened the door more explicitly for further rate cuts at the cash rate meeting on Thursday. The next 36 hours will be critical to whether these gains can be consolidated given the heavy local event calendar (dairy pricing, employment and the RBNZ Governor speech). The NZ dollar looks in better shape presently than we have seen for a while, although the pending release schedule will hold the key to whether this theme can prevail.

DIRECT FX Current level Support Resistance Last wk range
NZD / EUR 0.5999 0.5930 0.6050 0.5881 – 0.6021
EUR / NZD 1.6669 1.6529 1.6863 1.6608 – 1.7003

NZD/YEN

The New Zealand dollar staged a strong rally against the Japanese Yen since our last report. The rally came predominantly on the back of the (very) unexpected easing by the BOJ on Friday after they were seen imposing negative interest rates for the first time. The move lower in the JPY was immediate which exposed a very short USD long JPY market at the time. The plunge to ~76.00 post the RBNZ meeting now seems distant and given the expressed willingness for the BOJ to act further should not be visited in the immediate future. Threats to further gains for now will come from the NZ event calendar over the next 36 hours (dairy pricing, employment and the RBNZ Governor speech). First support is now seen around 78.00 with immediate resistance lying at and just above 80.00.

DIRECT FX Current level Support Resistance Last wk range
NZD / YEN 79.05 78.00 81.00 75.75 – 79.36

AUD/USD

The Australian dollar continues to build on its gains against the USD that were observed last week in recent trade. Factors at play include the recent softer U.S. data, reducing long USD positions after last week’s more subdued U.S. FOMC statement and the general improvement seen in investor risk sentiment. Of immediate interest for the AUD is today’s RBA interest rate decision and commentary, present pricing indicates almost no chance of a move at today’s meeting. Friday will also be important for the AUD/USD with Australian retail sales, the RBA statement on monetary policy and the U.S. employment report all due for release. We now favour buying dips.

DIRECT FX Current level Support Resistance Last wk range
AUD / USD 0.7095 0.7040 0.7180 0.6922 – 0.7138

AUD/GBP (GBP/AUD)                            

The Australian dollar has eased against the U.K. pound in recent trade and comes on the back of better than expected U.K. manufacturing PMI data overnight. Whilst the AUD/USD exchange rate has also improved in recent trade, the move has been understandably more circumspect ahead of this afternoon’s RBA monetary policy meeting announcement. Australian retail sales, the RBA statement on monetary policy and the BOE meeting all due for release on Friday should make for an interesting finish to the week for this cross. We moderately favour buying AUD dips presently.

DIRECT FX Current level Support Resistance Last wk range
AUD / GBP 0.4920 0.4860 0.5000 0.4871 – 0.4999
GBP / AUD 2.0325 2.0000 2.0576 2.0002 – 2.0529

AUD/EURO (EURO/AUD)

The Australian dollar is firming against the Euro in recent trade, although sits near last week’s closing levels presently. The RBA cash rate decision at 2.30pm AEST this afternoon is the immediate threat for this cross. Friday will also be important with both Australian retail sales data and the RBA statement on monetary policy due for release. We favour a continued outperformance of the EUR as the outlook for the AUD/USD exchange rate looks more favourable presently in light of the reducing market volatility.

DIRECT FX Current level Support Resistance Last wk range
AUD / EUR 0.6512 0.6475 0.6560 0.6368 – 0.6556
EUR / AUD 1.5356 1.5244 1.5444 1.5254 – 1.5705

AUD/YEN

The Australian dollar has continued to rise sharply against the Japanese Yen since our last report and took another sharp boost after the unexpected easing by the BOJ on Friday. This move has bolstered demand for risk assets (AUD+), and at the same time saw a sharp reduction in JPY longs (USD shorts) as traders moved to cover speculative positioning that was extended ahead of the announcement. The RBA cash rate decision this afternoon poses the first risk to this cross. Friday will also be important with the release of Australian retail sales and the RBA statement on monetary policy. We favour higher levels given the presently opposing sentiment displayed towards the JPY and AUD.

DIRECT FX Current level Support Resistance Last wk range
AUD / YEN 85.84 85.25 88.20 81.49 – 86.32

AUD/CAD

The Australian dollar continues to remain range bound against the Canadian dollar in recent trade as both the CAD and AUD continue to post solid gains against the USD. We see a decent likelihood of this cross moving beyond the immediate support and resistance levels this week given the event calendar which starts with the RBA cash rate meeting announcement this afternoon. Friday/Saturday morning will also be busy with a number of Australian and Canadian announcements due. We lack bias for now, although marginally favour lower levels in light of the recent superior CAD strength.

DIRECT FX Current level Support Resistance Last wk range
AUD / CAD 0.9910 0.9850 0.9950 0.9848 – 0.9987

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

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

Email:  

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

Market commentary:

The Bank of Japan (BOJ) delivered a real surprise to markets on Friday afternoon with further monetary easing. The move to negative interest rates was not expected and as a result the JPY lost significant ground across the board. The BOJ are the latest in a string of central banks so far this year to either ease outright, or signal further easing’s are coming. The ECB did just that a couple of weeks ago and last week the RBNZ did the same adopting a strong easing bias. In the US the Fed have recently dialed back expectations for future rate hikes and the market is now only pricing in slightly more than one interest rate hike this year. Attention now turns to the Reserve Bank of Australia (RBA) who release their rate statement this afternoon. However, the market may be disappointed if they are expecting too much of a change in stance from the RBA’s current ‘on hold’ position. The Australian central bank will likely acknowledge the weaker global outlook, but domestically we have seen decent data from Australia recently, in particular that of employment and inflation.

Australia

Trade in the AUD has been relatively quiet so far this week after Friday’s surge where the AUD, like the NZD, took a lift on the back of the surprise decision by the BOJ to cut interest rates. The ‘risk on’ sentiment which ensued help lift the AUD to levels last seen in early January. Earlier in the day credit data for December showed a lift from the month prior and continued moderate growth overall, the numbers showed a slowing in lending to property investors relative to owner occupiers. Inflation data released during the week topped the consensus forecasts, although the seasonally adjusted core measure for the quarter matched expectations. Of immediate interest for the AUD is today’s RBA interest rate decision (2.30 pm AEST). The market expects rates to remain on hold for the eighth consecutive meeting- which saw rates last lowered in May 2015. Trade data due for release tomorrow is forecast to show another sizeable monthly deficit as lower commodity prices continue to hit export earnings. Friday will see the release of the Q4 retail sales data and the important RBA statement on monetary policy.

New Zealand

Trade has been quiet so far this week, after the flurry higher seen on Friday post the BOJ interest rate meeting which saw the Japanese central bank adopt negative interest rates for the first time. The surprise decision spurred covering of short (sold) USD’s positions and in turn bolstered ‘risk on’ positioning which saw equity and commodity prices rally. The lift in the NZD was relatively short lived and came on the back of last week’s hangover from the RBNZ’s dovish monetary policy statement on Thursday. The NZD lifted in overnight trade on the back of more soft U.S. data having earlier taken the weak Chinese manufacturing PMI data in its stride. Key events in focus locally this week include the next GlobalDairyTrade auction (tonight), currently futures pricing predicts another decline in milk prices. This will be followed by tomorrow’s NZ Q4 employment report where employment growth is forecast to rebound in the December quarter from September’s surprisingly weak numbers. The unemployment rate is expected to tick higher on the back of growth in the labour force which has outpaced jobs growth. A speech later in the day by the RBNZ Governor will be watched for any additional clues on the RBNZ’s thinking on monetary policy.

United States

The US dollar has eased so far in trade this week after closing last week near its highs. This came despite a miss in the U.S. Q4 GDP data on Friday, although the market was well braced for the print given the growth comments from the FOMC the day prior. The data was helped by its composition which was driven by increased consumer spending and a reduction in inventories. Other data released included a boost in Q4 private consumption and a much better than expected Chicago PMI print. The Michigan consumer sentiment and expectation series both posted declines from the month prior, although the current conditions number posted a small rise. The key FOMC meeting on Thursday struck more dovish notes that that issued at the prior meeting after the Fed took heed of the recent economic and financial market developments and moderating U.S. growth. Data released overnight included a miss in the manufacturing PMI and ISM manufacturing PMI prints. The busy data week in the U.S. will peak on Friday with the release of the January non-farm payrolls employment report where the market is currently expecting the addition of 190k jobs for the month and a steady 5.0% unemployment rate.

Europe

The EUR has ratcheted higher in trade overnight on the back of improved demand in part on the back of U.S. data, which on the whole underwhelmed. The Euro closed last week out near its lows for the week after Friday’s euro-zone inflation numbers, which despite beating expectations, showed inflation running at levels which will continue to concern the ECB. President Draghi’s recent comments that included ones which said he was monitoring other central bank action may have added to the soft trading tone after the BOJ easing on Friday, this as the market mulls the likelihood of further ECB policy action. Data released last week included a worse than expected German IFO business sentiment print and negative inflation number for January. Declines in manufacturing and economic confidence were observed in the latest euro-zone data. January Markit manufacturing PMI data released overnight showed a sharp lift in the Spanish numbers, a miss in the Italian numbers was offset by an improvement in the German print. The French numbers remained unchanged from the month prior in neither expansion or contraction territory. The services and composite data are set to feature later this week.

United Kingdom

The GBP has shot higher in trade so far this week after data released overnight which showed a solid rebound in the U.K. manufacturing PMI in January and new orders, which expanded for the 35th consecutive month. Trading finished on a soft note last week after sentiment took a dent post the comments from BOE Governor Carney which further reduced expectations for a rate hike. Market expectations are now not pricing in a full hike until 2018, although some further clarity on the BOE thinking should be evident after this week’s central bank meeting on Friday. Other data of note last week included a slip in the CBI industrial trend total orders data and disappointment in the Nationwide house price index release. Of immediate interest will be the U.K. construction PMI release for January, slated for release tonight prior to the services print tomorrow.

Japan

The JPY sits significantly lower since our report on Friday after the shock easing by the BOJ later in the afternoon. This saw the central bank adopt a negative interest rate for the first time in an effort to jumpstart the Japanese economy out of years of stagnation. The new -0.10% rate is to be applied mainly to new reserves created from the middle of February. Many in the market saw the move as being aimed at weakening the JPY, given that the rate will apply to a small amount of bank reserves only. No further change in the quantitative easing programme was announced (80trn P/A). The heavy data schedule released just prior included a larger than expected decline in industrial production and household spending and further soft inflation data. This only served to further frustrate the speculative net long JPY positions which had only recently reached 4 year highs. The calendar for this week is quiet in Japan, although the JPY is likely to remain under pressure after last week’s move especially in light of Governor Kuroda’s promise to move rates further into negative territory should it be necessary.

Canada

The CAD has continued its recent run of strength in overnight trade, this despite oil prices which again saw decent declines. Data released on Friday dominated the local news calendar for the week. It included November GDP which printed in line with expectations, a decline in the raw materials price index and a further decline in the latest read of pricing for the major commodities sold by Canadian manufacturers. This week is a quiet one data wise for the CAD until Saturday morning when employment/ trade data for January and the Ivey PMI will be released. Oil news flow will continue to be a key driver, although last night’s decoupling of the CAD/Oil relationship indicates renewed enthusiasm by CAD bulls after last month’s dramatic decline saw prices reach some 6.3% below opening 2016 levels at their crescendo.

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 »