Program 12 | Flexible candlestick pattern strategy (with user definable filters)

Program 12 is a TradeStation EasyLanguage strategy that searches for candlestick patterns (the specific candlestick patterns searched for depend on which user inputs are selected, see below for more information). If a pattern occurs and a user defined filter or user defined filters evaluate to true within a user defined number of bars, then a trade is instigated.

This UNPROTECTED program (i.e. the TradeStation EasyLanguage strategy) is available for immediate download for $79.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

The user has the option to make the program look for the following candlestick patterns:

  • 3 White Soldiers
  • 3 Black Crows
  • Bullish Harami
  • Bearish Harami
  • Bullish Engulfing
  • Bearish Engulfing
  • Hammer
  • Hanging Man
  • Morning Doji Star
  • Evening Doji Star
  • Morning Star
  • Evening Star
  • Piercing Line
  • Dark Cloud

In each case the user can determine whether to look for the pattern by setting a user input (1 = yes, 0 = no). This also means that these patterns can be optimized for by setting the options to 0 and 1 in the optimization settings.

The video below describes these features in more detail.

The following image shows the Program 12 strategy applied to the S&P e-mini. Notice how the program has two targets. A user defined number of contracts are sold (or bought to cover) at the first target and the remainder are sold (or bought to cover) at the second target.

Please note that the following screen shots are examples and are not meant to imply that this program will generate profitable trades. THE STRATEGY HAS BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES.

Candlestick strategy applied to S&P E-mini

Program 12 applied to a 60 minute e-mini chart.


Also notice that text drawn on the chart indicates the sort of candlestick pattern that has been found. The codes for the patterns drawn on the chart (assuming the appropriate input is set to 1) are as follows:

  • 3BC = Three Black Crows
  • BeH = Bearish Harami
  • BeE = Bearish Engulfing
  • HM = Hanging Man
  • EDS = Evening Doji Star
  • ES = Evening Star
  • D = Dark cloud
  • 3WS = Three White Soldiers
  • BH = Bullish Harami
  • BE = Bullish Engulfing
  • H = Hammer
  • MDS = Morning Doji Star
  • MS = Morning Star
  • P = Piercing Line

The following image shows the program applied to a GBPUSD chart. In this case the ShowLines input is set to true. This means that the trailing stop is drawn as a red line.

Candlestick strategy applied to GBPUSD

Program 12 applied to a GBPUSD chart. The ShowLines input is set to TRUE.


User Defined Filters

One of the keys to using this program is to define filters within the program.

The default filters are set up as follows:

// Long filters
// Stochastic variables
Vars: oFastK( 0 ), // Variable for Multiple Output Function for Stochastic function
oFastD( 0 ), // Variable for Multiple Output Function for Stochastic function
oSlowK( 0 ), // Variable for Multiple Output Function for Stochastic function
oSlowD( 0 ); // Variable for Multiple Output Function for Stochastic function

Value1 = Stochastic( H, L, C, 10, 3, 3, 1, oFastK, oFastD, oSlowK, oSlowD ) ;
LongFilter1 = oSlowk < 25;
LongFilter2 = TRUE;
LongFilter3 = TRUE;

// Short filters
ShortFilter1 = oSlowk > 75;
ShortFilter2 = TRUE;
ShortFilter3 = TRUE;

In other words, LongFilter1 is TRUE if oSlowk is less than 25 and ShortFilter1 is TRUE if oSlowk is greater than 75.

Should you not wish to use the stochastic filter, then you would replace

LongFilter1 = oSlowk < 25;

and

ShortFilter1 = oSlowk > 75;

with

// LongFilter1 = TRUE;

and

ShortFilter1 = TRUE;

respectively. You would also comment out the stochastic calculation and variables.

Say you wanted to add an additional CCI filter, for example to filter trades such that we would only go long if the candlestick pattern must have occurred within MaxAfterCandle bars, any other conditions set evaluate to TRUE, and the CCI is less than -150 then you would need to add the following code:

Value2 = CCI( 14 );
LongFilter2 = Value2 < -150;

User Inputs

Length( 14 ), // Input to various Candlestick pattern functions
Percent( 5 ), // Input to various Candlestick pattern functions
Factor( 2 ), // Input to various Candlestick pattern functions
Adj( 0.0003 ), // Determines position of text
MaxAfterCandle( 5 ), // Determines how many bars after a candlestick pattern that a trade would be instigated (if filters become true)
Cts( 10 ), // Number of contracts to be traded
TrailVal( 100 ), // Trail value – expressed as multiple of minimum price move
Tgt1( 100 ), // First target – expressed as multiple of minimum price move (i.e. Target1 = Tgt1 * MinMove / PriceScale)
Tgt2( 200 ), // Second target – incremental to the first target (i.e. Target2 = Tgt2 * MinMove / PriceScale + Target1)
FirstTgtCts( 5 ), // The number of contracts to be taken off at first target
ShowLines( TRUE ), // If set to TRUE historical target and trailing stop lines are drawn – if false just today’s lines
Use3WhiteSoldiers( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
Use3BlackCrows( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseBullishHarami( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseBearishHarami( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseBullishEngulfing( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseBearishEngulfing( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseHammer( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseHangingMan( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseMorningDojiStar( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseEveningDojiStar( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseMorningStar( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseEveningStar( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UsePiercingLine( 0 ), // Use this Candlestick pattern (1 = yes, 0 = no)
UseDarkCloud( 0 ); // Use this Candlestick pattern (1 = yes, 0 = no)

See a video demonstration below.

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.

This UNPROTECTED program (i.e. the TradeStation EasyLanguage strategy) is available for immediate download for $79.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

The program was developed in Tradestation 8.7 and works on intraday, daily, weekly, and monthly charts. The strategy may be applied to tick charts, but the trailing stop line may not display correctly due to an EasyLanguage limitation.

See the video below for more information.

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.

This UNPROTECTED program (i.e. the TradeStation EasyLanguage strategy) is available for immediate download for $79.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

The program was developed in TradeStation 8.7 and works on intraday, daily, weekly, and monthly charts.

Video demonstration of Program 12


This UNPROTECTED program (i.e. the TradeStation EasyLanguage strategy) is available for immediate download for $79.95 by clicking the ‘add to cart’ button to pay using Credit card or PayPal.

If you would prefer to pay be check, please make a check payable to Billy Fire LLC and mail to Billy Fire LLC, 14781 Pomerado Road, #110, Poway CA 92064 together with a valid email address. I will email download instructions to you.

Please email any bugs that you may discover to support@markplex.com.

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.

Disclaimer The information, materials, products and services on this Web site are made available subject to the following terms and conditions. Markplex Corporation reserves the right to change these terms and conditions at its sole discretion. This Web site and any downloads, videos, tutorials, programs and information contained herein is presented solely for educational, informational, and/or entertainment use and under no circumstances should be used for actual trading. We at Markplex Corporation are not Broker/Dealers, Financial Advisers or Registered Analysts. No offer or solicitation to buy or sell securities, securities derivatives, futures products or off-exchange foreign currency (forex) transactions of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given or in any manner endorsed by Markplex Corporation. You are fully responsible for any investment or trading decisions you make. Futures and options trading has a large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. This Web site is neither a solicitation nor an offer to buy and/or sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this Web site. Past performance, whether actual or indicated by historical tests of strategies, is no guarantee of future performance or success. No warranties of profitability are being made or given. There is a possibility that you may sustain a loss equal to or greater than your entire investment regardless of which asset class you trade (equities, options futures or forex); therefore, you should not invest or risk money that you cannot afford to lose. CFTC RULE 4.41 - Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. Screen shots on this site are examples and are not meant to imply that any of the programs or tutorials available on this Web site will generate profitable trades. EasyLanguage or PowerLanguage trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions (and parts thereof) and associated techniques referred to, included in or attached to this tutorial or program description are examples only, and have been included solely for educational, informational, and entertainment use. Markplex Corporation does not recommend that you use any such trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions (or any parts thereof) or techniques. The use of any such trading strategies, signals, studies, indicators, showme studies, paintbar studies, probabilitymap studies, activitybar studies, functions and techniques does not guarantee that you will make profits, increase profits, or minimize losses. Markplex Corporation assumes no liability for any damages, direct or otherwise, resulting from the use of this information and/or program(s) described, and no warranty is made regarding its accuracy or completeness. Use of this Web site including the information, tutorials and/or programs included on it is at your own risk. You shall indemnify and hold Markplex Corporation harmless from any and all liability, loss, trading losses, costs, damage, or expense, including attorneys' fees you or third party may suffer (other than damage to your tangible property or injuries to employees occurring during the course of work) as a result of claims, demands, costs, or judgments arising out of third party and any other claims based on Markplex Corporation's performance, including, but not limited to losses resulting from the use of Markplex Corporation developed software, programs, web sites, tutorials, or the TradeStation charting and/or trading platform. Any testimonials on this Web site may not be representative of the experience of other clients and are not indicative of future results or success.
This Web site contains or may contain references and links to other companies and/or their Web sites, none of which is under the control of Markplex Corporation. Markplex Corporation makes no representations, warranties or endorsements whatsoever about any other Web sites to which you may have access through the Markplex Corporation Web site, or any products or services of those other companies, even if the products or services of those other companies or their Web sites are described or offered on the Markplex Corporation Web site or integrated with Markplex Corporation's products or services. TradeStation®, EasyLanguage® and PowerEditor® are registered trademarks of TradeStation Technologies, Inc. Other brand and product names which appear on this site are the trademarks or service marks of their respective owners, including: Microsoft® is a registered trademark in the United States Microsoft®Excel® is a registered trademark of Microsoft® Neither TradeStation Technologies nor any of its affiliates has reviewed, certified, endorsed, approved, disapproved or recommended, and neither does or will review, certify, endorse, approve, disapprove or recommend, any product or service that offers training, education or consulting regarding the use of EasyLanguage.

By continuing to use and navigate our sites, services, applications, tools or messaging, you are agreeing to our Terms and Conditions and the use of cookies, web beacons and similar technologies as described in our Privacy Policy and Privacy Policy on the use of cookies.