PHP Daytrader's Candlestick Pattern Hunter v1.0
Description
WHAT IS THE PHP DAYTRADER’S CANDLESTICK PATTERN HUNTER SCRIPT?
The PHP Daytrader’s Candlestick Pattern script is a “powerful” PHP / jQuery / Javascript script that takes a FREE near-real time stock quote feed (from Alpha Vantage and Tradier.com) to build a “live” full featured Highstock Combination chart (see Highsoft) that uses the candlestick chart to show your stocks’ “price action” NEAR REAL TIME in a responsive webpage that can be monitored in a desktop, laptop, tablet or mobile computer/phone.
Candlestick charts are generated every minute (5 or 15 mins – delayed quotes) for any stock in the NYSE, Nasdaq and any others found in the following list of exchanges (click here for all the exchanges Tradier.com supports). In addition to displaying a stock’s price action, this script also hunts for the most common candlestick patterns and flags them in the chart, for daytraders to use to forecast behavior (bullish, bearish, neutral) of all the stock’s in their portfolio.
You get 100% source code for this script so it is configurable so that daytraders can also define their very own patterns to monitor for also!
NOTE: this script relies on an internet connection to Tradier.com and AlphaVantage.com for near realtime and historical stock quote data. A high speed internet connection is required for this script to perform (use the demo to gauge how fast this script will run given your internet connection). This script will not run without connection to the internet (e.g. locally inside firewall without a connection to the web).

Compared to traditional bar charts,
many traders consider candlestick charts
more visually appealing and easier to
interpret. Each candlestick provides an
easy-to-decipher picture of price action.
Immediately a trader can compare the
relationship between the open and close
as well as the high and low. The
relationship between the open and close
is considered vital information and
forms the essence of candlesticks.
Green (bullish) candlesticks, where the close is greater than the open, indicate buying pressure. Red (bearish) candlesticks, where the close is less than the open, indicate selling pressure.
Candlestick patterns are a series of consecutive candlesticks that can be used to forecast future behavior of a stock – uptrend, downtrend, reversal, breakaways, consolidations, etc. See next section for more details.
WHICH PATTERNS WILL THIS SCRIPT HUNT FOR “OUT OF THE BOX”?
This script hunts for known candlestick patterns that are used by traders to predict the behavior of the stock. The following is the list of these patterns:


















HOW DO YOU SET UP YOUR OWN PATTERNS?
The “real power” of this script is that it allows the seasoned daytrader to create their own custom candlestick patterns that this script then hunts for (in near real time from any desktop, laptop, tablet or mobile computer/phone). To define a custom pattern, simply edit the file called config.php found in the php folder off the root (/php/config.php). In this file you will find the array ”$patternSettings” that contains the “out of the box” patterns this script searches for. See the previous section for the list. To add your own pattern, simply add to this array. The properties of each array object are pretty self explanatory. The last 15 candlesticks on your chart are objects you can reference in an “if condition” (see “eval” property below) that defines your custom pattern. $value is the object of the most recent candlestick created, $valueMinus1 is the previous candlestick, $valueMinus2 is the one before that and so on until $valueMinus15. The open, high, low, close values are just properties in the object (e.g. $value->open, $valueMinus1->close, $valueMinus15->high…). For example, see below the definition for the bullish harami pattern: array( “ID”=>”blHaram”, “eval” => “return (\$valueMinus2->open > \$valueMinus2->close && \$valueMinus1->open > \$valueMinus1->close && \$valueMinus1->open > \$value->close && \$value->close > \$value->open && \$valueMinus1->close < \$value->open);”, “title” => “BH”, “description” => “Bullish Harami”, “color” => ”#7dd0b6”, “text” => ’<table style=\’clear:both;height:113px;width:400px;\’><tr><td style=\’height:113px;width:70%;\’>BULLISH HARAMI (bullish) – A bullish Harami is a trend indicated by a large red candlestick followed by a much smaller green candlestick with a that body is located within the vertical range of the larger red candle body. Such a pattern is an indication that the previous downward trend is coming to an end.</td><td style=\’height:113px;width:30%;\’><img src=\’http://candlestickhunter.saas1.us/img/pattern-bullishharami.png\’></td></tr></table>’ ), NARRATIVE DESCRIPTION: Here is a narrative description of the definition above. First look at the rule in “eval” property. It says look at the two previous candlesticks ($valueMinus1 and $valueMinus2) and make sure they are in a downtrend (e.g. their close values are less than their opens). Then look at the current candle’s ($value) close and make sure it is less than the previous candle’s ($valueMinus1) open and finally make sure current candle’s open is greater than previous one’s close. The rest of the properties are pretty self explanatory: ID – unique ID for the pattern eval – (we just taled about above) title – letters that appear in the flag description – friendly description of the pattern color – color of the flag text – html of what appears in the “hover” bubble for the patterns flag HOW TO USE THE SCRIPT
- To install/run the script, unzip the contents of the purchased zip file into the root folder of your domain/subdomain and then enter URL in a browser(e.g. http://stocktracker.saas1.us or http://yourdomain.com or http://yoursubdomain.yourdomain.com, etc)
- Enter the ticker symbols of the stocks you want to track. They can be from the following list of exchanges – (click here for all the exchanges Tradier.com supports)
- Select the candlestick patterns you would like this script to hunt for. This is based on the patterns defined in /php/config.php file. (See instructions on defining patterns in previous section)
- Select the interval duration of your candstick (e.g. 1 minute, 5 minute or 15 minute)
- Select the type of moving average you want displayed on your chart (e.g. SMA – simple moving average, EMA – exponential moving average, etc) They can be from the following list (click here for all the exchanges alphavantage.co supports). Moving averages are used by daytraders to determine support and resistance levels of stocks. Graphing this value is included in this script (see orange lines)
- Select the moving average period to use for orange line (e.g. 10 day average, 15 day average, 30 or 60 or 90 or 120 day averages)
FEATURES – see blue squares above
- This script’s main panel is a combination highstock chart (see highsoft.com) that is fed “near realtime” from two FREE stock quote API calls. Realtime and historical stock price information comes from a service called Tradier (see tradier.com and the technical anlaysis (moving averages, etc) comes from a service called Alpha Vantage (see alphavantage.co). The combination chart displays stock quote area line graph on top pane, a candlestick chart in the main pane, volume chart in the third from top pane and then range finder for the entire chart in the bottom pane. (the foundation can be found in the following Highstock demo page – click here)
- Real time 1 minute, 5 minute and 15 minute candlesticks, generated as trading day progresses.
- Candlesticks that follow defined pattern are hunted for and identified by these circular flags. Gray flag means neutral behavior (e.g. doji’s), green flag means bullish behavior (e.g. bullish engulfing, etc), red flag means bearish behavior (e.g. bearish engulfing)
- Mouseover (hover) over a flag and popup (tooltip) description of the pattern found is displayed.
- Technical indicator line charts (see orange line – e.g. simple moving average, exponential moving average) are overlayed on top of price and candlestick charts, to help with identifying ssupport and resistance levels.
- Real time stock price quote in a area line chart
- Real time stock volume in a column chart
- Highstock range selector to zoom in and out of chart’s date ranges
- Highstock range panning. For desktop/laptop, use shift+leftmouse and drag to pan. For tablet/mobile device, use two finger swipe.
- More zooming – toggle to zoom in by highlighting area to zoom into.
- OHLC (open, high low, close) quote every 5 seconds
- Countdown to when next candlestick will get generated
- Repsonsive nav bar to navigate to different stocks’ charts
- Top menu icons for liding panels – settings, stock quote detail, candlestick realtime data, pattern flags sorted by counts
FUTURE IMPROVEMENTS – FROM THE NINJA
I would like this to be the beginning of a series of visualization
tools for day traders. With all the amazing backend stock investing
related web services available today, it would be great to move the
needle in the types of tools available for the independent daytrader.
This would include establishing a community (like open source in software) where fellow traders can help each other be successful. Daytrading is small enough that it does not need to be zero sum game. e.g. everyone can win. From technical standpoint, I would like to see any functionality found in these scripts (especially real time feeds) incorporated into my popuplar dashboard scripts.
-Data Ninja
AUTHOR’S NOTE ON SCRIPT: see blog post – Author’s Note: PHP Daytrader’s Candlestick Hunter
REMINDER ON EXTENDED LICENSES: Just a friendly reminder that there are two different license levels at codecanyon.net. The regular license is for single FREE user use. If you have multiple clients or charging clients for functionality from this script, then an extended license is the appropriate level. It’s only fair as I do spend a lot of time tuning these scripts. And more sales/revenues means I can code more features and it has come to my attention that many purchasers are using my script for commercial (for pay) purposes with just the regular license. Thanks for you support. Click for more details – Regular vs. Extended License Comparison
NOTE ON INSTALLATION
- Purchase script from codecanyon.net
- Unzip contents on the ROOT folder of your domain or subdomain. DO NOT TRY TO RUN FROM A FOLDER IN YOUR DOMAIN. WILL NOT WORK
- Sign up for API key from alphavantage.co and enter in the /php/config.php file
- Sign up for access token from developer.tradier.com and enter in the /php/config.php file
- Sign up for an appropriate highsoft license for your project (note this script uses a hosted version of the highstock plug in. No installation necessary for highsoft plug in)
- This script includes 100% of source code. You can customize to integrate into your software/web application. Please see REMINDER ON EXTENDED LICENSES to make sure you a purchasing the correct license level.
- Any browser that supports HTML5/Javascript, jQuery (2.1.4). Tested with Chrome Version 49.0.2623.110 (64-bit), Safari Version 5.1.7 (7534.57.2), Internet Explorer 11.0.9600.18230, Firefox 5.0.2
- A PHP/MySQL supported webserver is required for jsfiddle features (preview, share, save) and render script options #3 and #4 – click here for phpinfo for PHP/MySQL versions and configuration options of the server serving up the demo. IMPORTANT: make sure to compare with phpinfo of your installation. Many PHP/MySQL errors stem from configuration options of customer php server instances.
- This script uses hosted libraries for Highsoft (code.highcharts.com, etc) and no installation required. It does require you to procure the appropriate Highsoft (Highcharts, Highmaps, Highstock) license based on your use. Click here for details.
- See ‘Note on installation’ to install this script on your server.
VERSION HISTORY – PHP Daytrader’s Candlestick Hunter
- VERSION 1.0 (9/4/2017) – Initial launch version
- This script’s main panel is a combination highstock chart (see highsoft.com) that is fed “near realtime” from two FREE stock quote API calls. Realtime and historical stock price information comes from a service called Tradier (see tradier.com and the technical anlaysis (moving averages, etc) comes from a service called Alpha Vantage (see alphavantage.co). The combination chart displays stock quote area line graph on top pane, a candlestick chart in the main pane, volume chart in the third from top pane and then range finder for the entire chart in the bottom pane. (the foundation can be found in the following Highstock demo page – click here)
- Real time 1 minute, 5 minute and 15 minute candlesticks, generated as trading day progresses.
- Candlesticks that follow defined pattern are hunted for and identified by these circular flags. Gray flag means neutral behavior (e.g. doji’s), green flag means bullish behavior (e.g. bullish engulfing, etc), red flag means bearish behavior (e.g. bearish engulfing)
- Mouseover (hover) over a flag and popup (tooltip) description of the pattern found is displayed.
- Technical indicator line charts (see orange line – e.g. simple moving average, exponential moving average) are overlayed on top of price and candlestick charts, to help with identifying ssupport and resistance levels.
- Real time stock price quote in a area line chart
- Real time stock volume in a column chart
- Highstock range selector to zoom in and out of chart’s date ranges
- Highstock range panning. For desktop/laptop, use shift+leftmouse and drag to pan. For tablet/mobile device, use two finger swipe.
- More zooming – toggle to zoom in by highlighting area to zoom into.
- OHLC (open, high low, close) quote every 5 seconds
- Countdown to when next candlestick will get generated
- Repsonsive nav bar to navigate to different stocks’ charts
- Top menu icons for liding panels – settings, stock quote detail, candlestick realtime data, pattern flags sorted by counts
My Other Scripts at Codecanyon: - (BRAND NEW!!!) PHP Dashboard v5 (Enterprise Edition) - PHP Daytrader’s Candlestick Pattern Hunter v1.0 - Twilio “Geo-text” Plug-In (a PHP Uber-style Geotracker Add On) - PHP Uber-style GeoTracker - PHP Dashboard v4.0 Collaborative Social Dashboards - PHP Dashboard v3.0 – For Mobile Devices - PHP Dashboard v2.7 – Responsive Carousels - PHP Dashboard – NEW Version 1.2 - HTML5 Data-Driven Documents (D3js) Plug-In - HTML5 Cloud Dashboard Designer - HTML5 Streetmaps - PHP Streetmaps
OTHER LINKS
| Type | PHP Script |
|---|---|
| Author | data_ninja_DISABLED |
| Category | Php Scripts / News Tickers |
| Price | $29 |
| Sales | 34 |
| Rating | 0.00 from 2 ratings |
| Published | Sep 8, 2017 |
| Last Update | Sep 8, 2017 |
| Compatible Browsers | IE9, IE10, IE11, Firefox, Safari, Opera, Chrome, Edge |
| Compatible Software | PHP 7.x, PHP 5.x, PHP 5.0 - 5.2, PHP 5.3, PHP 5.4 |
| Source Files Included | JavaScript JS, JavaScript JSON, HTML, CSS, PHP |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
STOP GUESSING WHAT TO POST
AI that learns your brand voice and builds a month of consistent, on-brand social content: carousels, posts and hooks that sound like you, not like everyone else's AI.
SaaS · 4,299 views · 38 clicksSaaS · Week 45 · 4,299 views · 38 clicks
🥈
Conversational Backlinks for Busy Founders
Place Backlink Relevant Conversation for your domain across Forums and Conversations
Website · 42,021 views · 223 clicksWebsite · Week 45 · 42,021 views · 223 clicks
🥉
upvote.club
Free Social Media Engagement that Helps Boost Your Content. Upvote Club supports 19 social networks with 100+ engagement actions in one dashboard. Add links to your posts and get free engagement from real users.
SaaS · 40,065 views · 117 clicksSaaS · Week 45 · 40,065 views · 117 clicks
#4
Substack Posting API
Onboard your Agent to Substack. Write Publish on Substack via API
SaaS · 59,074 views · 198 clicksSaaS · Week 45 · 59,074 views · 198 clicks
#5
Seenshot App
Free, Fast, MacOS Screenshot app. Make Screenshot cmd+shift+2 and send it via link
Desktop App · 28,449 views · 122 clicksDesktop App · Week 45 · 28,449 views · 122 clicks
#6
Hand-Placed Backlinks $9.99 per link. Flat rate.
Buy hand-placed forum, Q-A and directory backlinks. Flat $9.99 per link, no subscriptions — you only pay for approved listings.
Website · 4,282 views · 19 clicksWebsite · Week 45 · 4,282 views · 19 clicks
#7
Free Invoice Generator - PDF Invoices in Your Browser, No Sign-Up
A free invoice maker for freelancers and small businesses: fill in the invoice, check the live preview, and download a PDF that looks exactly like it. Any currency, tax per item, three templates, no sign-up, and nothing leaves your device.
2,957 views · 17 clicksWeek 45 · 2,957 views · 17 clicks
#8
Merge PDF Files Free - Combine PDFs in Your Browser, No Upload
A free PDF merger for office workers, students, and freelancers: combine PDFs and images into one file in the browser, reorder files and pages, pick page ranges, keep bookmarks, and open password-protected PDFs. Nothing is uploaded, no sign-up, no watermark.
2,730 views · 13 clicksWeek 45 · 2,730 views · 13 clicks