Saturday, 5 August 2023

How to Pull Data From NSE Stock Exchange in Excel & Make advance Option Chain in Shortcut Method!! NIfty50!!



NSE:: National Stock Exchange of India Limited is one of the leading Stock Exchange in India, based in Mumbai. NSE is under the ownership of various financial institutions such as banks and insurances.

It’s the world’s largest derivatives exchange by number of contracts traded and the third largest in cash equities by number of trades for year 2022. It is one of the largest stock exchanges in the world by market capitalization.

 NSE provide data related its all listed options Realtime basis daily on its website for traders to calculate flow of market (i.e- Open Interest, Change in OI, LTP, IV, etc) of both Call & Put Side. Many of new traders invest directly without any deep calculation and without knowing uses of Realtime data provided by NSE to calculate the risk of investment and get losses. Today we will learn about how to use that live data and Sync it with Excel Sheet to make strategies for investment and trading in right way to avoid loses. It help to understand current position of market and where it will move in upcoming hours by calculating OI, COI, and all terms. It not right 10 out of 10 but will help you a lot to reduce your loses.

Requirements:  Microsoft Excel 2016 or later version

                 Lit bit knowledge of HTML, IE to find Cookies and links

                 Lit bit knowledge of Excel & Macros.

                 Rest you leave on this post 😊 just follow all steps carefully and don’t miss anything.

 

Step 1:  Go to NSE Website (https://www.nseindia.com) then go to Derivatives à Options à Nifty50 à Option Chain then right click on webpage.

Then




 

Copy Cookie and Goto Excel.

Step 2: Make 3 Sheets in Excel Workbook. Name: Cookies, Nifty50, Source.

Step 3: In Cookies Sheet, Name Cell A2 as Cookies and Paste Cookie in A3 cell.


Step 4: Go to Sheet Source, then click on Data Tab then Goto New Query à From Other Source à Blank Query.

Step 5: Rename it with ExpiryDate. Then right click on query à Advance Editor, Clear the values showing there and paste as I mentioned below.


let

    Source = Json.Document(Web.Contents("https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY", [Headers=[Referer="https://www.nseindia.com/get-quotes/derivatives?symbol=NIFTY", #"User-Agent"="Mozilla/4.0 (compatible;MSIE6.0; Windows NT5.1", Accept="text/html; charset=utf-8", #"Accept-Language"="en-us,en;q=0.9", #"Accept-Encoding"="gzip,deflate", Cookie="Cookie copied from website"]])),

    records = Source[records],

    expiryDates = records[expiryDates],

    #"Converted to Table" = Table.FromList(expiryDates, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Expiry"}})

in

    #"Renamed Columns"

 

Step 6: Close and Load to Cell D3 of  sheet “Source”.

Step 7: Repeat step 4 and 5, rename query with StrikePrice then Close & load to Cell A3 of Sheet “Source”

let

    Source = Json.Document(Web.Contents("https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY", [Headers=[Referer="https://www.nseindia.com/get-quotes/derivatives?symbol=NIFTY", #"User-Agent"="Mozilla/4.0 (compatible;MSIE6.0; Windows NT5.1", Accept="text/html; charset=utf-8", #"Accept-Language"="en-us,en;q=0.9", #"Accept-Encoding"="gzip,deflate", Cookie="Cookie"]])),

    records = Source[records],

    #"Converted to Table" = Record.ToTable(records),

    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "timestamp" or [Name] = "underlyingValue")),

    #"Transposed Table" = Table.Transpose(#"Filtered Rows"),

    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),

    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"timestamp", type datetime}, {"underlyingValue", type number}}),

    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"timestamp", "TimeStamp"}, {"underlyingValue", "StrikePrice"}})

in

    #"Renamed Columns"




Step 8:  Repeat Step 4 and 5, rename query with Nifty50 then close & load to Cell F3 of sheet “Source”

let

 

    Source = Json.Document(Web.Contents("https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY", [Headers=[#"Accept-Encoding"="gzip, deflate", #"Accept-Language"="en-US,en", #"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.206", Cookie="Cookie"]])),

 

    records = Source[records],

 

    data = records[data],

 

    #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),

 

    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"strikePrice", "expiryDate", "CE", "PE"}, {"strikePrice", "expiryDate", "CE", "PE"})

 

in

#"Expanded Column1"

Expend CE, PE with selecting “OI, OICh, IV, LTP, Change”

 








Till now we have completed our work almost in sheet “Cookies” and “Source”, now we will work on main sheet named as “Nifty50”

Step: 9 In Sheet “Nifty50” we will special paste(link)  values from Source sheet A4:B4 then format C4 as general.


Step 10: In Sheet “Nifty50” cell F3 à Data Validation à In source select list of Expiry then OK.

 





Step 11: Prepare Table format as shown in image below (remember that keep position of table same as shown in image to avoid any problem during paste of formula



(Note: Values and formula will be placed from cell no. 7 in table.)

Step 12: In Cell G16 Paste formula “=MROUND(C3,50)

Step 13: in upper cells use “=G16-50” and in lower cells use “=G16+50”

Step 14: Copy Formula in F7

=SUMIFS(NiftyData[CE.change],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 15: Copy Formula in E7:

=SUMIFS(NiftyData[CE.impliedVolatility],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 16: Copy Formula in D7:

=SUMIFS(NiftyData[CE.changeinOpenInterest],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 17: Copy Formula in C7:

=SUMIFS(NiftyData[CE.openInterest],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 18: Copy Formula in B7:

=SUMIFS(NiftyData[CE.lastPrice],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

 Step 19: Copy Formula in A7    

 =IF(AND(D7>0,OR(F7>0)),"Call Buy","-")

Step 20: Copy Formula in H7:

=SUMIFS(NiftyData[PE.impliedVolatility],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 21: Copy Formula in I7:

=SUMIFS(NiftyData[PE.impliedVolatility],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 22: Copy Formula in J7:

=SUMIFS(NiftyData[PE.changeinOpenInterest],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 23: Copy Formula in K7:

=SUMIFS(NiftyData[PE.openInterest],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 24: Copy Formula in L7:

=SUMIFS(NiftyData[PE.lastPrice],NiftyData[expiryDate],Nifty50!F$3,NiftyData[strikePrice],Nifty50!G7)

Step 25: Copy Formula in M7:

=IF(AND(H7>0,OR(J7>0)),"Put Buy","-")

Now drag all formula to complete table as show in below image


Step 25: by conditional formatting make it more usable like shown below

Now we will create 3 buttons and will assign macros to them.


To create Macros just copy & Paste below code:


Public t As Date

 Function CookieN(URL)

With CreateObject("WinHttp.WinHttpRequest.5.1")

    .Open "GET", URL, False

    .setRequestHeader "User-Agent", "Mozilla/4.0 (Compatible;MSIE 6.0;Windows NT 5.1)"

    .setRequestHeader "Accept", "text/html;charset=utf-8"

    .setRequestHeader "Accept-Language", "en-us,en;q=0.9"

    .setRequestHeader "Accept-Encoding", "gzip,deflate"

    .send

    strCookie = .getAllResponseHeaders

    strCookie = Split(strCookie, vbCrLf)

    CookieN = Trim(Split(Split(strCookie(5), ";")(0), ":")(1)) & "," & Trim(Split(Split(strCookie(6), ";")(0), ":")(1))

    End With

      

End Function

 

Sub Nifty50()

Dim C As String

C = (CookieN("https://www.nseindia.com/get-quotes/derivatives?symbol=NIFTY"))

ThisWorkbook.Sheets("Cookies").Range("A3").Value = C

End Sub

Sub GetData()

Call Nifty50

ThisWorkbook.RefreshAll

End Sub

Sub Ref()

Call GetData

t = Now + TimeValue("00:01:00")

Application.OnTime t, "Ref", Schedule:=True

End Sub

Sub Stp()

On Error Resume Next

Application.OnTime t, "Ref", Schedule:=False

End Sub


Final Result:




(Important: Save Sheet in macros enable workbook)

 

Thanks😊

Wednesday, 15 February 2017

Interplanetary Friendship in aspects of Astrology...!

Interplanetary Friendship in aspects of Astrology...!!!




Planet SUN, MOON, MARS, MERCURY, VENUS, JUPITER, SATURN with shadow planet Dragon Head & Dragon Tell (Rahu & Ketu) exist in our solar system. By Astrological view , Each planet see to each others as Friend or Enemy and in some cases maintain neutral relationship with them. Here I will try to elaborate about their relationship with each others. 
Existence of two friendly planets in same bhav in Lagna-Kundli is benefic and presence with Enemy planet it gives malefic results to native.




* Although Jupiter view towards Venus as enemy but Venus play neutral relationship, so in some cases existence of both planet in same house (*depend on which one is more powerful) can be considered as favorable condition.

*This article is for educational purpose only. Detailed analysis of complete birth-chart with help of professional Astrologer is must before concluding any final prediction.

Sunday, 4 December 2016

Latest Custom Rom for Samsung Galaxy Ace S5830i (Up-gradation of Touch wiz Resurrection V 9.5)

Latest Custom Rom for Samsung Galaxy Ace S5830i (*Tested on S5830i Only)

Disclaimer: Altering the OS(Android) of Smartphones means to update it via rooting or any other custom ROM in such manner that it render your device unusable, that brick phone will not be able to boot and stuck in boot-loop. A brick phone is "dead-phone", which can not perform any task.This article is only for educational purpose. I am not responsible for any damage occur  to your phone or any loss occur to anyone in any manner.


This Rom is up-gradation of  Touch Wiz Resurrection V 9.5. I made some cool changes to give it a attractive look with better stability. I rolled back few Samsung's Stock app to make it faster and rich featured via restoring some system app.

Change log: 1. Status bar ++
                     2. Battery Icon with Animation
                     3. Removed "Auto" brightness Checkbox from notification panel.
                     4. Changed Progress bar color.
                     5. Changed Notification background.(Semi-Transparent )
                     6. New Settings.
                     7. Toggle button for B/T and Wi-Fi in Settings.
                     8. Data Uses Option with help of Third-party Application.
                     9. Stock based Lock Screens.
                    10. Samsung Stock based Fm player
                    11. Samsung Stock based Music player.
                    12. Samsung Stock based Clock & Weather app.
                    13. Samsung Stock based Task-Manager.
                    14. Better Icons to theme.
                    15. Removed some useless tweaks.
                          & much more.....

Some Screen shots from my device , having this upgraded "Galaxy Touch-Wiz Redesigned" ROM .

 

 

 

 

 


Installation Process: --   1. Go to CWM Recovery
                                           2. Clear & wipe Data
                                           3. Clear & wipe Catch.
                                           4. Go to advance --> Clear & wipe Delvik Catch
                                           5. Install zip from SD card and select Copied Rom.
                                           6. Reboot & Done.


Note: * If you got stuck on boot loop screen. Your device is bricked. You must restore official Firmware according your Country . for more visit: http://pa-learning.blogspot.in/2015/04/how-to-unbrickflash-official-android.html

Credits: Touch-Wiz Resurrection Team & Me ðŸ˜œ

As I don't have such knowledge about GPL or any other Copyright issues, so if any one find it debatable then let me know via comment first. I respect to the hard work of Team Touch-Wiz so I mentioned heartfelt thanks to them for this ROM.

Thanks to me also would be appreciated 😎😎 

If you got stuck anywhere during installation, then let me know about your problem via comment section. I will try my best to solve it with my knowledge.

Download Link is here:   Download



Saturday, 26 November 2016

Cut Computer Cost Up-to 70%!!! Use N-computing

Disclaimer: This article is for only educational purpose. I am not responsible for any  loss/Profit occur to anyone in any manner.

Cut Computer Cost Up-to 70%!!! Use Thin Clint--Desktop Virtualization:




Getting yourself upgraded in terms of technology is not worthwhile every time in technical terms, as in general the criteria behind up gradation and using up of latest technology can be either status symbol or need of an hour too, which every one tries to fulfill without any proper technical know how. A very common example of this is, in field of Computing where we always try to buy something new or something costly or we look for the latest trend and without getting any deep knowledge we just pay more. If we need more then one Computer then again we go for a whole new set up with lots of price. Instead to play blind here i would like to tell you about that technology which can cut your new computer cost up-to 70% and will help you to save electricity resources for same. 

Thin-Clint-PC, A useful computing technique to save money and electricity resources to full fill our daily useful and common task. Thin Clint is a Desktop Virtualization technique used to share already having computer resource to make a whole new computer environment for new user with facility of general computing.

Some Pros to understand better the use of Thin Client PC-

1. Ultra Low power Consumption.
2. Up to 70 % economically efficient.
3. Need Less space and money to set-up a complete new PC.
4. Quick Boot-up time.
5. Reduce expenses for maintenance.

As i mentioned , setup of this N-client is much easy. Here i m explaining the process of setup N-client "QHM6051PS2"

Step-1 : Power on the Device and connect all peripherals to it i.e: Monitor, Mouse, Keyboard, Speakers.

Step-2:  Connect Your thin client with your main machine via Cross-over LAN cable and be sure about physical connectivity of both devices.


Step-3: In network properties of N-client , click on use Static IP address then assign same class IP address to device with Gateway.


Step-4: In terminal Server TS connection list , click on TS-2 and Edit as mentioned below.


Step-5:  Here mention Username of your main machine and in place of Domain, keep your server name as it is.


Step-6: OK then Connect.

Here is Your all new virtual desktop ready to work as new computer.


Sunday, 24 January 2016

Love/Arrange Marriage & Married life Prediction-Astrological Eye!!

Love/Arrange Marriage & Married life Prediction-Astrological Eye!!

‘Marriage’ the most important phase of life is how much dependent of luck/destiny or according to the choice of elders and the family members as per our Indian culture. Are marriages in hands of human beings or not?
Today it’s the most debatable issue, as per my opinion it’s not at all in the hands of we the human beings, it’s not affected by our doings, as destiny is written at the time when we take birth at this heavenly place named “earth”
Who will be your better half? How will be your married life?  Whether your married life will be successful or not? Answer of all these question and a lot more is clearly stated in the birth chart of each individual .Some of us are blamed for favoring love marriage as its against our Indian culture, but it’s not so, if it is written in our destiny and is mentioned in your birth chart it is sure to happen irrespective of opposition of even your close family members.
Parents and the family members generally blame their child if they go for love marriage, but should they really blame them or should accept easily leaving it on destiny?


Here I would like to discuss about what your stars says about your marriage? Love marriage or arrange marriage? How your this phase of life will be? Whether parents will change your destiny and will go against your birth chart or they will be following what your destiny says?

If Jupiter with Venus  sharing same 7th house in birth chart says that native will get marriage suddenly so some link it  that this would be love marriage. Lord of 7th house in 5th house also indicate about love marriage and partner will be mature and helpful for native in this case. Placing of Venus in its own house make person charming and magnetic for opposite gender. Placing of Rahu & Ketu also says much more about it! If Rahu is placed in 5th house in birth chart indicate mood elevation much in life, although thy receive love but do not live happily with what they receive with their partner, they find them always puzzled either in situations or in love triangle  on opposite if Ketu is placed in 5th house in birth chart indicate that native never get   satisfaction and completeness in term of respect and love in family.  They think their partner not deserving for them. Mars in 8th house in girl birth chart indicate separation and lack of understanding and happiness in relationship. Apart from that , Saturn-Venus aspect (180 degree opposite from each other) gives challenging love-life in which they find rejecting relational pattern and get peaceful love letter in life.

Note: If Venus  in 6th ,8th or 12th house placed then its not good for married life. Venus in 5th or 8th house shows Physical separation and 12th house Venus shows for Extra martial affairs where their partner would be rejected by them.

**Although Conjunction of Sun com-busting Venus in my opinion cause trouble for married life. It depends on degree and distance from each other. In this kind of conjunction native burn in own desires  but It purify to the love of native. If sun is weak then native can face problem at work place because of Love relationship .

Good or Not Good Placing of Stars For Marriage and Married Life & For Love/Arrange Marriage:



Love marriage should not be predicted by only Lagna Kundali. "Navmansh Kundli" also should be check before prediction. Some time Placing of Moon also indicate about Love . Placing of Moon in 2nd 8th and 10th house and 12th house also are favorable for Love relationship. Place of Mars should also check before prediction along with Venus to predict close to the reality.

Wednesday, 4 November 2015

Way to Slipstream SATA driver to Windows Xp....Help!! Install WIndow Xp in Hp Laptop!!!

How to Slipstream SATA driver into Window Xp.....??

In laptops of HP which one has main-board of series 5 or greater than this,  You can not install Windows Xp from CD or Removable drive without slipstream SATA/AHCI driver into installation media because without it your installation media will not find any hard drive in your laptop. Now , as we are more habitual for Window Xp so we spent a lot of time with Xp so I would like to show you the way to be able to install your most favorable operating system window Xp in your Hp's Laptop.

Required: 

1. Original Windows Xp installation disk.
2.  n-Lite  
3. Intel Mobile Express Chip-set family SATA driver . (Google)
4. CPU-Z
5. Novicorp's  WinToflash to make bootable Xp's installation removable drive.

now follow the procedure explained below.

1. --- Copy the original Windows Xp installation disk somewhere in your hard drive, where ever you want to save.

2. --- Execute Cpu-z to check information about your laptops hardware as shown below in picture. i.e in below picture its showing that my laptop has Intel 7 series main board.



3. --- Now, firstly Google for SATA driver for your hardware.


4. --- Execute n-lite and follow the steps showing in pictures below.


Click on Next button...


 Browse location of content copied from installation disk in your hard drive and click on next...



Click on Drivers button, the dot indication will be green after selected....


Click on Insert then choose Single driver and then click on next....



Browse SATA driver downloaded for your hardware and choose iaAHCI.inf  ..... 



In textmode driver choose right driver according your hardware, as i selected Intel 7 series Chipset Family SATA AHCI Controler and click next.....


Click Next....


Click Next...


Click Finish....

Now you have completed the process to slipstream driver into installation package.

5. --- Now make an bootable pen-drive to install Xp on your laptop. Here I would like to suggest 3rd party tool i.e Novicorp's WintoFlash software.


This tutorial  is for only educational purpose. I am not responsible for any damage occur  to your hardware or any loss occur to anyone in any manner. Suggested third party soft-wares from personal experience and there is no advertising in any manner.

Wednesday, 23 September 2015

Top 3 alternatives of carrying removable drive in pocket...!!!

Top 3 alternatives of carrying removable drive in pocket...!!!


Carrying Pen drive or Removable disk everywhere in pocket means carrying tech-viruses in pocket to infect PC to PC. This fashion has both pros and con. The pros of using external devices as a storage solution far outweigh its cons. Main  advantage of this kind of storage device is its portability being a separate device from your PCs. So, you can use it anywhere you are without the need to bring your desktop PCs with you.
With the increasing use of Cloud storage, pen drives and other storage mediums are less preferred. In today’s scenario with high internet usage affording internet connections, smart phones and carrying data is not so difficult.
Because of the recent technological development, in order to carry large data we need not to carry any physical storage device with us, the only requirement is a Smartphone and an active data connection. This is the best and most preferred alternative which is commonly known as cloud –storage. Cloud Storage is type of digital storage at hosting companies’ server. Which is more secure safer and far away from the risk of stolen and infection from viruses. Some examples of cloud storage are listed below...

1. Google Drive
2. One Drive

3. Dropbox

Above mentioned alternative are available on both desktop and mobile platform. To use this in your smart phones you need to install their app from app stores. After installing app and registration you will be able to logon to access your data safely. In windows platform of desktop you can install its application to directly access them from your explorer as drive.

Process to Set-up and Pros are explained below:

Google Drive:  Google drive is freely available up-to a limit of 15 GB for everyone, the thing you need to avail it is an account on Google.


---> Click to avail:  Google-Drive <---



then, Install Google Drive on your Smartphone and computer to access and to keep your file safe with it.
                 


One Drive: One drive is also freely available up-to a limit of 15 GB for everyone, the thing you need to avail it is an account on Microsoft.


---> Click to avail:  One-drive <---



then, Install One drive on your smartphone and you can access via. office 360, directly from explorer in window 10.



Drop-Box:  Drop-Box provide 2 GB free storage @ time of registration to users. The thing you need to avail it an account on Drop-Box.


---> Click to avail:   Drop-Box <---



lateron you can access services from your smartphone, computer, web browser. Its avail for Android, IOS, Mac Os, Windows.

except above named services there are more options are available like:  SugarSync, I-cloud, SUN, Source, Amazon Web Services, IBM, 3tera, OpenD, EMC, vmware etc ....etc...aprox 100 companies.

Note: Above mentioned name are only for explanation. there is no advertising in any manner. This is based on personal experience and its only for awareness.  Companies policies may change according them, Read carefully before use. I am not responsible for any controversies. 

Sunday, 20 September 2015

Change color of Progress-bar in Your Smart-PHONE----(THEME-ANDROID)

Disclaimer: Altering the OS(Android) of Smartphones means to update it via rooting or any other custom ROM in such manner that it render your device unusable, that brick phone will not be able to boot and stuck in boot-loop. A brick phone is "dead-phone", which can not perform any task.This article is for only educational purpose. I am not responsible for any damage occur  to your phone or any loss occur to anyone in any manner.


How to Change color of Progress-bar in Your Smart-PHONE----(THEME-ANDROID):



To do this you need to follow the below steps:





Requirements:

To change color of progress bar of  your android you should have some basic things with you :

1. Rooted Android Phone.
2. Data Cable
3. Root Explorer
4. Apk Compiler/De-Compiler
5. Photoshop color picker to know the Hex-value of your desired color.
6. XML editor (i.e - Notepad/Notepad++)

Steps:

1. Root Your Android Smartphone. (How to Root..?)

2. Install Root-explorer and copy-pest firmware.apk  to your computer. Now decompile with help of       any decompiler (Google for apk Decompiler/Compiler i.e Tickle My android, Kitchen Android)

3. Look for Progress_horizontal.xml in ->  res/drawable folder of de-compiled apk.

4. Open it with XML editor and look for Hex values shown below and change them according to             your's choice of color, leave (FF) starting two digit of hex value unchanged. To know about hex          value of your's choice color look it in adobe Photoshop.
   

     


5. Change the values and re-compile firmware.apk.

6. Copy and replace in your phone with help of Root explorer.

7. Restart Your phone.


Note: Some Hex values from my side

Green:          (ff1ffb02)
Yellow:        (fff2fb02)
Cyan-Blue:  (ff33b5e5)

For any other query please write your problem in comment box. I will try my best to resolve them.