Using a Runner with Two Contracts

Trading one contract limits your options. You have a stop and a target. You can move the stop manually or automatically. Let’s say you have a target of 40 ticks and a stop of 20, with a reward to risk ratio of 2:1. If you want to move the stop to BE and still maintain a 20 tick margin, you would move the stop to BE when you reach 20 ticks of profit.  What if I told you that you could move the stop at 10 ticks of profit and guarantee yourself a zero loss trade?

Using two contracts where one comes off early and one is a runner, gives you a better chance of a winning trade, while increasing the likelihood of a zero loss trade. Wouldn’t you rather break even than have a loss? (Note that if the trade moves against you from the start, there is a chance of losing 40 ticks, so this is not a guranteed setup.)

The idea is to take one contract off quickly, and move your stop, so the second contract still has room to move, without a net loss. If the first Target is 10, when it comes off, move the stop to BE-10 (or-9 if you want to account for commissions). Then the second contract still has 20 (or 19) ticks of wiggle room before it gets stopped out, and it if does, it it a zero loss trade. If it “Runs” then every tick it moves above 10 is net profit. You can move the stop to BE when the second contract gets to 20, and you are guaranteed a 10(or 9) tick profit. You can manually move the stop from there or just leave it at BE.

The runner now has a chance to really run, because you set the target high enough to give you a good win. If it looks like price is going to keep on moving, you can move the target higher, to take advantage of the trend.

Example: 1 point = 100 ticks. Preferred stop is  6p = 600 ticks

Possible Results:

Trade Window Setup:


Trade Window Setup for Stop: Step 1

 

Trade Window Setup for Stop: Step 2

 

 

DLLs, Spreadsheets, and How Study Timing and Precedence Matter

Ever noticed that the Sierra Chart study settings window has some information in it that looks like this:


S3 V3 Study Settings Shifted over

Each study has a time in ms (milli-seconds) and a CalcOrder or Calculation Precedence. The time represents the relative impact of each study, and the calculation order, the sequence they are exectuted in.

Each study is a function or subroutine that is called multiple times a second, and the time it takes to do that is important if you want your study to make a trading decision in the shortest amount of time.  The order in which the study is called is also important, as many studies rely on the results of other studies, and in order to get the latest results, you don’t want a study that needs data from another study to run at the top of the list, as it may end up getting old or incorrect data. 

The placement of the custom study functions in the list is predetermined to optimize the timing and precedence of the information needed. Non-essential studies are moved below the custom studies, as no automated decisions are being based on them. 

Note that Sierra generally calculates the precedence based on the studies themselves. Each built-in study as a Standard, Low, or Very Low Precedence. In general you can change the precedence of a study by moving it up or down the list.

One of the studies with very low precedence is the Spreadsheet System for Trading Study. It sees the output of all the studies that do calculations, so it automatically comes later than a DLL based custom study/system that does not need all data, just the data it cannot get internally which it gets from other studies on the chart. The DLL ends up running with a lower ms timing, and earlier in the list than a spreadsheet. However, Sierra Chart does not automatically determine what data the custom function relies on upon determining the proper CalcOrder for a study.  It is therefore important not to move studies up or down without recognizing the impact that change may have on the accuracy and performance of the custom studies.

Custom Studies, Alerts, and Trading Systems

Forgiving Computers develops custom tools that can help you with your trading. We use the extensible features of Sierra Chart, including spreadsheets, ACSIL (C++ DLLs), custom alert formulas, and trade management based on your rules.

Some examples:

  • Studies: Completely new or a combination of existing studies
  • Alerts: Signal conditions that depend on your rules
  • Trading Systems: Automatic Entries, Exits, moving stops and targets, scaling in and out

If you can describe your needs in objective terms, it can probably be coded.

Contact us for a quote:

     

    Home

     

     

    Why are DLLs better than Spreadsheets?

    Forgiving Computers began developing trading systems using spreadsheets for Sierra Chart. If you are familiar with Excel or other spreadsheet applications, you know spreadsheets provide a quick way to do number crunching with immediate results. The Sierra Spreadsheet functionality integrates the ease of use of spreadsheets with the ability to combine price action data, with study results (Moving Averages, Bollinger Bands, etc.) and create signals or new studies based on the data of the current and previous candles.

    A Dynamic-Link Library, or DLL, is an Application Extension that adds functionality to Windows applications in a modular way. Studies provided by Sierra Chart are written in C++ and compiled into DLLs. Customs studies and systems can be added to your charts the same way. DLLs can be shared across charts and chartbooks with none of the drawbacks of sharing spreadsheets across chartbooks.

    There are several advantages to this approach.

    1. Speed
    2. Memory
    3. Independence
    4. Complexity

    Speed

    Because DLLs are compiled, they use the processor’s native instruction set to perform calculations. Spreadsheets add layers of overhead. Whether it is a Spreadsheet Study, System with Alerts, or Trading System, the data has to get into the spreadsheet in the proper format, be processed with the specific formulas needed to determine the results, and then translated back into the study that incorporates the results into your charts. Also, the spreadsheet has to wait for all the studies to complete their processing before beginning to evaluate results. All that takes time, even though the spreadsheet study itself is compiled, the formulas that make up the spreadsheets are converted from Excel format to an internal format.  This can result in trades being taken fractions of a second later than with DLLs.

    If you use the same spreadsheet in multiple chartbooks, using the same chart number, Sierra will update the “sheet” for the first chartbook, then moments later, update the next, and so on. This is inefficient and can cause more delays. (This is why you need to take extra steps to “clone” a chartbook with spreadsheets.)

    Memory

    DLLs take up less space in memory and on your disk. One copy of the DLL is sufficient for all the charts it is attached to, where you need multiple copies of spreadsheets to avoid the above update cycle. Less memory usage also improves performance.

    Independence

    A compiled C++ DLL study is “linked” into the main Sierra application, in as many places as you like. No “cloning” is needed to maintain top performance, as is necessary with spreadsheets.

    Complexity

    More functionality is available to the custom study with DLLs. For example, BID/ASK data, and Volume Profile data can be incorporated into a custom study with DLLs, but not with spreadsheets.

    Other advantages include automatic installation and updating, user-based licensing, copy protection, and time-limited trial versions.

    There are some disadvantages to using DLLs. Spreadsheets can be used to quickly develop studies to try out ideas and see results quickly. C++ requires some programming skills, where spreadsheets require some Excel skills. As with anything worth learning, expertise comes with time.

    Conclusion

    C++ based custom studies provide the best methods for adding functionality to Sierra Chart. They can be used for new studies, creating alerts, and for complete auto-trading solutions.  Forgiving Computers is in the business of providing trading solutions. We will develop most new studies in C++, however, we will also do custom spreadsheet solutions for customers that want them. Either way, we want you the trader to be successful with the custom decision support tools we provide.

    Auto-Trading Basics

     

    Auto Trade Setup

    CAUTION: Auto Trading with live money is risky, and should NOT be enabled without supervision! There is no Holy Grail. It is not “Set it and forget it”. You are solely responsible for all trades taken manually or automatically. Plan on monitoring all Auto Trades. 

    One strategy followed by many auto traders is to leave Auto Trading Disabled until you start seeing arrows forming, and then when you like where price action is going, enable Auto-Trading. After entering the trade, immediately disabling auto trading will allow you to exit the trade knowing it won’t jump in on the next candle that may not be one you want to enter on.

    Auto Trading in Sierra can be done in Simulation Mode (local or server based) or with Live Money. There are several safety checks in place to make sure you really want to trade live money. You can see the Auto Trade signals (Arrows) at all times, only if all the Auto Trade switches have been enabled will it trade live money.

    • Startup: Auto Trade is Disabled

    Your Trade Menu should look like this when you start up Sierra Chart:

    The only item checked is “Disable Auto Trading on Startup. This should stay checked. That way the next time you start Sierra, you won’t start Auto Trading unexpectedly.

     

    • Enable Global Auto Trading

    This is the Master Switch that turns on and off all (Global) Auto Trading. Note that turning it on the first time will not begin Auto-Trading, it is more like the Big Red Switch or EMO that shuts off any Auto Trading that is going on. For now, we will turn it on by doing Trade>>Auto Trading Enabled – Global.

    Each Chart can also have Auto Trading Enabled or Disabled. The setting for the chart is Auto Trading Enabled – Chart. This setting is saved with the chartbook. The default is that it is disabled.


    Your Trade menu should look like this:

    Any chart that you are OK with Auto Trading from should have checkmarks for both Auto Trading Enabled – Global and Auto Trading Enabled – Chart.

     

    • Disable Auto Trading from charts you don’t want to auto trade from

    Any chart you don’t want to Auto Trade from should have “Auto Trading Enabled – Chart”  UNCHECKED.

    Like this:

    • Ready to Auto-Trade? Remember Auto Trading is not “set it and forget it”. Its main benefit is the timing of the entries as soon as the proper conditions are met. You should plan on monitoring all trades, and take control if it is not going as you think it should. Also watch for trades taken near the end of the trading day, as they may not exit automatically!

     

    1. Live Trading (Real money or Simulation Server when available)

    Trades are sent to the trade service, and if it is the Live Service, real money is at stake.

     

    1. Uncheck Trade>Trade Simulation On

    1. Studies: ID1 S3 V3 Auto Trade Settings
      • Send orders to Trade Service = Yes

     

    • Confirm you have checked Trade>>Auto Trading Enabled – Global and Trade>Auto Trading Enabled – Chart
    1. SIM (Local Sierra Simulation Server – use for Playback, Back-testing, and Forward Testing)

     

    All trades are simulated on your machine, whether you are connected to the trade service or not.

     

    1. Check Trade>Trade Simulation Mode On

    1. Confirm trades are not being sent to the Trade Service.
      1. Edit Study: ID:1 S3 V3 Auto Trading System (or whichever Spreadsheet Study you are using)

    • Confirm you have checked Trade> Auto Trading Enabled – Global and Trade>Auto Trading Enabled – Chart

     

    1. Disable Live Trading:
      1. All Charts in All Chartbooks: Uncheck Trade>>Auto Trading Enabled – Global
      2. Just Specific Charts: Uncheck Trade>>Auto Trading Enabled – Chart.


    Note that you can disable Auto Trade for specific charts by Unchecking Auto Trading Enabled – Chart for each chart you want disabled. The Global setting controls ALL Auto Trading.

     

     

     

    Buttons for Auto-Trade Enable/Disable

     

    To simplify the setting of the Auto Trade-Global and Auto Trade Chart, you may want to add a button for each to the control bar.

     

    1. To do this click Global Settings>>Customize Control Bars>> Control Bar 1 (or whichever one you are using).
    2. On the left scroll down to Trade and click the “+” sign to expand the list:

    1. Scroll down to “Auto Trading On/Off – Global|ATG” and select it and click “Add->”
    2. You will see the selected item move to the right side:
    3. Repeat steps 1 and 2 for “Auto Trading On/Off | ATC” and click OK.
    4. You should now have two buttons labeled ATG and ATC on your control bar.

    Note the ATG is Enabled because it appears depressed, the ATC is not enabled.

    The ATC button will change appearance as you go from one chart to another depending on whether that chart is enabled or not. This is a shortcut to visually check the setting and to change it quickly.

    Custom Studies in Sierra Chart

    Forgiving Computers began developing trading systems for Sierra Chart, which has a very powerful user interface for creating and combining studies, alerts, and trading systems. At first, spreadsheet studies were used, due to their simplicity and ease of creating new tools. Spreadsheets, which automatically import price data and the values of the attached chart studies, allow new formulas to combine input data to create new outputs: lines, symbols, backgrounds, alerts, and trade entries and exits.

    While flexible and relatively simple, the spreadsheet studies create a new set of complications.  For one, they cannot be shared between chart books. To do so would create a performance bottleneck on top of the overhead provided by the spreadsheet functionality. Another drawback is the performance penalty of using spreadsheets since the study is going through a layer of translation into and out of the spreadsheet.

    The alternative to creating custom studies in spreadsheets is to write them in a high-level programming language and compiling them to plug-in efficiently to the Sierra Chart platform. Sierra provides an Application Programming Interface (API) called ACSIL, or Advanced Custom Study/System Interface and Language. This allows new studies to be written in C++,  the same open source programming language that not only Sierra Chart is written in, but C++ and its older relative C, are the “languages of choice” when performance is important (think operating systems, drivers, games, browsers, etc.). By writing custom studies and trading systems in C++ we get the benefits of a rich programming interface, which means we can get “under the hood” and do things that the spreadsheet studies cannot do. For example, order flow data (i.e. Number Bars in Sierra) is available in ACSIL but not in spreadsheets. Will C++ DLL studies, Trade Order Quantity does not have to be set in two places, the study has its own inputs, without relying on another study for Inputs. The potential for more and better advanced systems is far higher with hard coded, C++, studies.

    The S3, T3, and W3 trading systems have all been rewritten in C++, and they are now available as DLL files, as all studies included in Sierra Chart are. There is no issue with sharing DLL files across chartbooks, as each chart gets its own copy of the study without being shared. Their compact size means improved performance. Also, they can be made available to customers on a time limited trial basis, allowing you to test drive them before buying. Besides being smaller and faster, the DLL’s are automatically installed in your data folder (even if you have more than one instance) and are automatically updated.

    From this point on there will no longer be system development or updates for spreadsheet systems. They will continue to function, but support for them will end sometime this summer. You are encouraged to give the tools a try and compare it side by side with the spreadsheet system. Owners of the Version 1 and 2 systems will receive a discount off the lifetime subscription equal to the price they paid for the spreadsheet system(s).

    Online Training

    With remote control software, we can share screens and I can provide one on one training in the Sierra Chart application. Maybe you need some time getting to learn all the details, or just want to know how to do a specific task. I am an experienced IT Professional, Software Developer, and Trainer.  Want to learn how to use trailing stops? How about alerts? Wondered how spread sheets work with Sierra? Wonder no more, as we can work together to make your trading platform more familiar.  This was the thinking behind the name Forgiving Computers. We make computers less challenging and more useful.

    Welcome Sierra Chart Users


    My name is Brad Houser. I have been using Sierra Chart for over 2 years, after having used TradeStation and ThinkorSwim. I find it very flexible, lightweight, and powerful. It takes a little getting used to, and its UI is sort of reminiscent of Windows NT. However, since it is written in C++, it uses much less memory than the other platforms, and it performs much faster.

    I started creating Studies with Spreadsheets and have found them to be very versatile and straightforward. I gradually got some auto trading studies working, and wanted to share them with other Sierra Chart users who are interested in exploring them. Auto-trading can be helpful if you have a trading plan that follows a set of mechanical rules for getting into and exiting a trade. It is not a good idea to let them run without supervision, as you may need to use some discretion if market conditions are not according to your plan. I have created auto trading chartbooks for futures that are configurable for various scenarios. They also help you stick to your plan by setting Daily Maximum profit and loss limits that will shut off auto trading when met. Even if you don’t use the signal for automatic trading, these trading systems can help you decide if you want to manually enter a trade or not.

    If there is a system you would like me to develop, I can let you know if I can code it for you. I charge different amounts if it is only to be for you, or if I can resell it to others. Let me know in the Contact Us form.

    0
      0
      Your Cart
      Your cart is emptyReturn to Shop