<%@page import="sun.reflect.generics.tree.Tree"%> <%@page import="java.util.Iterator"%> <%@page import="java.util.Date"%> <%@page import="java.text.SimpleDateFormat"%> <%@page import="java.text.DateFormat"%> <%@page import="java.util.ArrayList"%> <%@page import="com.util.TechnicalUtil"%> <%@ include file="dbConnection.jsp" %> Over Bought Stocks | Over Sold Stocks <%response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache"); response.setDateHeader( "Expires", 0 ); %>
<% Connection dbConn = null; ArrayList listData = new ArrayList(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); String trend = request.getParameter("trend") != null ? request.getParameter("trend") : ""; String indicator = request.getParameter("indicator") != null ? request.getParameter("indicator") : ""; String label = trend.equals("up") ? "Bought" : "Sold"; try { dbConn = getConnection(); String[] dateList = checkifRecordsPresent(dbConn); Date date1 = dateFormat.parse(dateList[0]); Date date2 = dateFormat.parse(dateList[1]); Date date14 = dateFormat.parse(dateList[13]); Date date60 = dateFormat.parse(dateList[59]); listData = TechnicalUtil.overBoughtSoldByWR(dbConn, date1, date2, date14, date60, trend, indicator); %>


<%@include file="/include/Header.jspf" %>

Stock Over <%=label%> by <%=indicator.equals("WR") ? "William %R" : indicator%>

<% DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); %> PATTERN DATE : <%=sdf.format(date1)%>


RSI

<% Iterator it = listData.iterator(); if(listData.size() > 0) { while(it.hasNext()) { %> <% String[] result = (String[])it.next(); for(int i = 0; i < result.length; i++) { %> <% } %> <% } } else { %> <% } %>
BSE Code Name Sector Current Price Non - smoothed RSI Smoothed RSI ROC William %R Volume
<%=result[i]%>
No trend my friend!

ROC

<% it = listData.iterator(); if(listData.size() > 0) { while(it.hasNext()) { %> <% String[] result = (String[])it.next(); for(int i = 0; i < result.length; i++) { %> <% } %> <% } } else { %> <% } %>
BSE Code Name Sector Current Price Non - smoothed RSI Smoothed RSI ROC William %R Volume
<%=result[i]%>
No trend my friend!

William %R

<% it = listData.iterator(); if(listData.size() > 0) { while(it.hasNext()) { %> <% String[] result = (String[])it.next(); for(int i = 0; i < result.length; i++) { %> <% } %> <% } } else { %> <% } %>
BSE Code Name Sector Current Price Non - smoothed RSI Smoothed RSI ROC William %R Volume
<%=result[i]%>
No trend my friend!

<% } catch (Exception e) { System.out.println("Error in fetching over bought / sold details " + e); } finally { dbConn.close(); } %>
<%@ include file="/include/footer.jspf" %>