Search This Blog

Wednesday, February 27, 2019

Stock Market Walk Though - Weekly Expiry - 28-02-19

1. Monthly Expiry
2. Features- Nifty looks like bearish, BN slightly looks strong bearish.
3. Option PCR - Nifty/BN - Netural
4. Up side 75-100 and BN - 150-200 pts expected. down side 50-75 and the BN - 200 Pts
5. FII/DII are net buyers
6. SGX are positive now.
7. Surprisingly NIFTY 10400 PE is added and it is not 7rs. Open nifty in green may reduce the premium,
8. Today trade will confuse us. coz of IND/PAK and Trade war.
9. Nifty  may close in between 10700 - 10900 [range will be 200 pts, point 8th], BN may close inbetween 26850-27100
10. Max Pain on nifty - 10800, BN 27000.

TRADE WITH EXTRA CAUTION,


My Trade Plan

 1. ATM in stocks, OTM on Nifty
 2. LOTS - Confidential*


HAPPY TRADING
Vijay

Wednesday, February 20, 2019

Stock Market Walk Though - Weekly Expiry - 21-02-19

1. Nifty/BN Weekly Expiry
2. PCR - Nifty looks like neatural, BN slightly looks bullish.
3. But the volume/OI changes shows like bullish trend after or once the break out happens.
4. Up side 75-100 and BN - 150-200 pts expected. down side 50-75 and the BN - 200 Pts
5. FII are net sellers and DII are buyers. Still waiting for FII to pump in.
6. ADX, MACD signals are still not confirm the bullish.
7. Short cover happend yest in nifty and shot up in last 40 min.
8. SGX nifty is 20 pts low at 8:30 AM IST. so looks like our NIFTY may go down before bulls take position.
9. 10700-800 is the SR-1 and 10600-1900 SR-2 with huge OI.
10. Yesterday BN traded with huge volume in 27000 strike price. so BN may trade between 26800-27200.
11. Nifty may end inbetween 10700-800 and BN


TRADE WITH CAUTION,


My Trade Plan

 1. BN - Stradle, Strangle [depends]
 2. LOTS - Confidential*


HAPPY TRADING
Vijay

Monday, February 11, 2019

Install Java Jar Module as Windows Service

1.  Install nssm.exe
2. Go to that nsse.exe folder
3. type like below command

nssm.exe install "Test-JAR-Service" "C:\Program Files\Java\jdk1.8.0_77\bin\java.exe" "-jar D:\Test\Test.jar"


open services.msc from start run, there u can see ur service,
enjoy


To remove the service
4. sc delete "Test-JAR-Service"

Wednesday, February 6, 2019

Stock Market Walk Though - Weekly Expiry - 07-02-19

1. Bank Nifty Weekly Expiry
2. RBI policy announcement is there today and there is a little chance to impact the market.
3. If any rate cut is happens, then that will impact the bank nifty expiry and becomes volatile
4. BN will be in the range of 27000 - 27650 and more chances to close in down side 27200 - 27300 & up side 27350 -27500, coz max pain at 27300.
5. BN daily charts in bullish and it formed like spinning TOP, so take trade after the HIGH or LOW breakouts.
6. MACD & DMA 50,200 golden crossover signal shows the bullish trend,


TRADE WITH CAUTION,


My Trade Plan

 1. BN - Stradle, Strangle [depends]
 2. LOTS - Confidential*


HAPPY TRADING
Vijay


Wednesday, January 30, 2019

Stock Market Walk Though - Weekly & Monthly Expiry - 31-JAN-19

1. Weekly & Monthly Expiry for Jan
1.1 FII,DII activity is just less than 100 crores
2. Global market are in green
3. SGX is in almost 0.7% up
3.1 most of the time, Both Banknifty & Nifty are in neutral yesterday, Nifty will travel between 10580-10780, No sign of breaking these zones.
3.2 Banknifty support/resistance zones are in 26500-27000
4. Nifty may close between 10675-10775 range.
5. Premimum are very low yest and expect the same today
6. Buy on support, Sell or resistance.
7. Hedge will not be good option if it travels in the closing range [3,4 th point]
8. Feb-1 Budget may show some direction,


TRADE WITH CAUTION,


My Trade Plan

1. Nifty, BN - Stradle, Strangle [depends]
2. LOTS - Confidential*


HAPPY TRADING
Vijay

Friday, November 16, 2018

Java Dynamic Method Call with params by using reflection

package com.product.rpa.api.ws;

import java.lang.reflect.Method;

public class DynamicMethodCall
{
public String sample ()
{
return "vijay";
}

public String sampleWithParam ( String x )
{
return x + " " + x;
}

public String sampleWithMultipleParams ( String x, int i )
{
return x + " " + i;
}

public static void main ( String args[] ) throws Exception
{
DynamicMethodCall dynamicMethodCall = new DynamicMethodCall ();

// with out param
Method method = dynamicMethodCall.getClass ().getMethod ( "sample" );
String result = (String) method.invoke ( dynamicMethodCall );
System.out.println ( result );

// with param
// String parameter
Class [] paramString = new Class[1];
paramString[0] = String.class;

method = dynamicMethodCall.getClass ().getMethod ( "sampleWithParam", paramString );
result = (String) method.invoke ( dynamicMethodCall, "hi - param" );
System.out.println ( result );

// with multiple params
// String parameter
paramString = new Class[2];
paramString[0] = String.class;
paramString[1] = Integer.TYPE;

method = dynamicMethodCall.getClass ().getMethod ( "sampleWithMultipleParams", paramString );
result = (String) method.invoke ( dynamicMethodCall, "hi - ", 100 );
System.out.println ( result );

}
}

Friday, September 28, 2018

Nodejs code to convert string date to another date format.

Sample nodejs code to convert string date to another format.


date.js

var moment = require('moment');
bar ('1980-08-29', 'YYYY-MM-DD', 'DD/MM/YYYY');    //calling method

function bar(date, currentFormat, requiredFormat )
{
    var date = moment(date,currentFormat);
    var train_date = date.format(requiredFormat);
    console.log(train_date);        // 29/08/1980
    return train_date;
}
exports.bar = bar;



//npm install --save
//node date.js

Monday, September 17, 2018

NodeJS - Request Plugin for file attachment MULTIPART/FORM-DATA

package.json

{
  "name": "sample",
  "version": "1.0.0",
  "description": "",
  "main": "apicall.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": { 
    "request": "^2.83.0" 
  }
}



apicall.js

var fs = require("fs");
var request = require("request");

var fs = require('fs');
var request = require('request');
request.post({
    url: 'https://url/upload',
    formData: {
keyName1: 'value1',
                keyName2: 'value2',               
               file: fs.createReadStream('d:/temp/30off.jpg')
    },
}, function(error, response, body) {
    console.log(body);
});


steps

npm install
node apicall.js

Tuesday, September 11, 2018

Jacoco Sonar Report - Maven

COMPILE
mvn -X clean install -Dwtpversion=2.0 eclipse:eclipse

OR Ignore Test Cases
mvn -X clean install -Dwtpversion=2.0 -Dmaven.test.skip=true eclipse:eclipse

generate report  
**************
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent -Dmaven.test.skip=true install

JSoup - HTML Parser for image audio video attributes

SAMPLE

package com.jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.safety.Whitelist;
import org.jsoup.select.Elements;

public class HtmlParser
{
public static String html = "<html><head><title>Sample Title</title></head>"
         + "<body>"
         + "<p>Sample Content1</p>"              
         + "<img name='pic1' id='picid1' src='test.jpg' />"  
         + "<p>Sample Content2</p>"
         + "<p>Sample Content3</p>"
         + "<img name='pic2' id='picid2' src='test2.jpg' />"
         + "<video width='320' height='240' controls>"
        + "<source id='1' src='movie.mp4' type='video/mp4'>"
        + " <source  id='2' src='movie.ogg' type='video/ogg'>"
        + "<Br/>Your browser does not support the video tag."
        + "</video>"
        + "<audio controls>"
        + "<source id='1' src='horse.ogg' type='audio/ogg'>"
        + "<source id='2' src='horse.mp3' type='audio/mpeg'>"
        + "<Br/>Your browser does not support the audio tag."
        + "</audio>"
        + "<p><a href='http://example.com/'" + " onclick='checkData()'>Link</a></p>"
         +"</body></html>";


/*output
Initial HTML: <p><a href='http://example.com/' onclick='checkData()'>Link</a></p>
Cleaned HTML: <p><a href="http://example.com/" rel="nofollow">Link</a></p>*/
public static void safeGuardHtmlSanitize ()
{
System.out.println ( "Initial HTML: " + html );
String safeHtml = Jsoup.clean ( html, Whitelist.basic () );
System.out.println ( "Cleaned HTML: " + safeHtml );
}

public static void main ( String [] args )
{

Document document = Jsoup.parse ( html );
// img with src ending .png
Elements imgs = document.select ( "img" );
for ( Element img : imgs )
{
System.out.println ( "Name: " + img.attr ( "name" ) + " id: " + img.id () + " src: " + img.attr ( "src" ) );
//to replace the value existing
img.attr ( "src", "replacedImage.jpg" ) ;
}
System.out.println ( "\n\n" );

Elements videos = document.select ( "video" );
Elements videoSrc = videos.select ( "source" );
for ( Element vSrc : videoSrc )
{
System.out.println ( " id: " + vSrc.id () + " src: " + vSrc.attr ( "src" ) + " type: " + vSrc.attr ( "type" ));
}
System.out.println ( "\n\n" );

Elements audios = document.select ( "audio" );
Elements audioSrc = audios.select ( "source" );
for ( Element aSrc : audioSrc )
{
System.out.println ( " id: " + aSrc.id () + " src: " + aSrc.attr ( "src" ) + " type: " + aSrc.attr ( "type" ));
}
System.out.println ( "\n\n" );

safeGuardHtmlSanitize();
}
}



OUTPUT

Name: pic1 id: picid1 src: test.jpg
Name: pic2 id: picid2 src: test2.jpg



 id: 1 src: movie.mp4 type: video/mp4
 id: 2 src: movie.ogg type: video/ogg



 id: 1 src: horse.ogg type: audio/ogg
 id: 2 src: horse.mp3 type: audio/mpeg



Initial HTML: Sample TitleSample Content1
Sample Content2
Sample Content3
Link
Cleaned HTML: Sample Title
Sample Content1
Sample Content2
Sample Content3


Your browser does not support the video tag.

Your browser does not support the audio tag.
Link



Hit Counter


View My Stats