Reader small image

You're reading from  Python Algorithmic Trading Cookbook

Product typeBook
Published inAug 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838989354
Edition1st Edition
Languages
Right arrow
Author (1)
Pushpak Dagade
Pushpak Dagade
author image
Pushpak Dagade

Pushpak Dagade is working in the area of algorithmic trading with Python for more than 3 years. He is a co-founder and CEO of AlgoBulls, an algorithmic trading platform.
Read more about Pushpak Dagade

Right arrow

The recorded close price of the last traded day of a financial instrument

Often, trading strategies use the previous day's closing price of a financial instrument as one of the first qualifying conditions before making decisions to place trades. Comparing the current day's opening price with the previous day’s close price may give a hint as to whether the market price is bound to rise or fall for the current day for an instrument. If the open price is significantly higher than the previous day's close price, the price may continue to rise for the day. Similarly, if the open price is significantly lower than the previous day's close price, the price may continue to fall for the day. The recorded close price data is static in nature, meaning it does not change during the live trading hours. This recipe shows how to fetch the previous day's close price of a financial instrument.

Getting ready

Make sure the broker_connection and instrument1 objects are available...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Python Algorithmic Trading Cookbook
Published in: Aug 2020Publisher: PacktISBN-13: 9781838989354

Author (1)

author image
Pushpak Dagade

Pushpak Dagade is working in the area of algorithmic trading with Python for more than 3 years. He is a co-founder and CEO of AlgoBulls, an algorithmic trading platform.
Read more about Pushpak Dagade