NexusFi: Find Your Edge


Home Menu

 





Backtesting with Sierra Chart (SC)


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one LittleFinger with 7 posts (2 thanks)
    2. looks_two bbking with 4 posts (1 thanks)
    3. looks_3 Jemo with 1 posts (0 thanks)
    4. looks_4 chris123 with 1 posts (0 thanks)
    1. trending_up 5,497 views
    2. thumb_up 3 thanks given
    3. group 6 followers
    1. forum 12 posts
    2. attach_file 0 attachments




 
Search this Thread

Backtesting with Sierra Chart (SC)

  #11 (permalink)
 
LittleFinger's Avatar
 LittleFinger 
Denver Colorado/USA
 
Experience: Intermediate
Platform: SierraChart
Broker: AMP
Trading: ES
Posts: 116 since May 2017
Thanks Given: 132
Thanks Received: 145

So I put this on hold for a bit because I was working on some other things, but by using some nifty ACSIL features I was able to compare the current day with the day that the last fill occurred on.

You need to get date values: https://www.sierrachart.com/index.php?page=doc/SCDateTime.html

// generate position data:
s_SCPositionData PositionData;
sc.GetTradePosition(PositionData) ;

// define variable for the current date
int CurrentDay = sc.BaseDateTimeIn[sc.Index].GetDate();

// define variable for the last fill date
int LastFillDay = PositionData.LastFillDateTime.GetDate();

// make this a condition of your trade entry logic if you want to limit the strategy to one trade a day
CurrentDay > LastFillDay



Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 Jemo 
FLorida / USA
 
Experience: Intermediate
Platform: TS, MC, NT
Broker: TS, TOS, IBKR, TastyWorks
Trading: Index, Commodities, Currencies
Posts: 21 since Apr 2017
Thanks Given: 31
Thanks Received: 14

I am very new to backtesting and I was wondering if you can recommend a book/site/source where I can start learning the fundamentals of backtesting, preferably using sierra charts.

All I could find after doing a search on support of of SC, site that sells a backtesting software and no info on how to use SC for this purpose (profsoftware.com)

thank you

Follow me on Twitter Reply With Quote
  #13 (permalink)
 
LittleFinger's Avatar
 LittleFinger 
Denver Colorado/USA
 
Experience: Intermediate
Platform: SierraChart
Broker: AMP
Trading: ES
Posts: 116 since May 2017
Thanks Given: 132
Thanks Received: 145


The SC site has all the info for backtesting with their software. Everything I know about SC I learned from the documentation they provide and asking the occasional question on their support forum as well as searching through the posts for things already answered. I would recommend using google to search the SC site, because it works a little better than the site's built in search. Ex: type into google search: "site: sierrachart.com backtesting". Before you start coding and getting fancy, you can simply replay the chart and make simulated trades to test your ideas. As far as using good methods to gather accurate statistics, Kevin Davey has good recommendations and has a free Monte Carlo simulation spreadsheet that you can download from his site. He has many webinars you can watch on here.

Also they have a spreadsheet system that allows you to write automated strategies using the calculation format, cell references, and formulas that work in excel. So if you already can do basic excel stuff that is a good way to start. It is not as efficient or capable as using the C++ based ACSIL, but it's really fun to play with to test out some basic ideas and have an automated test run with a statistics report generated afterwards.

Another thing I do sometimes is load the spreadsheet study and throw whatever indicators are interesting to me on the chart. Then set the spreadsheet study to use a whole lot of rows so that it populates the spreadsheet with the values of the indicators as far back as you want. If you have your chart set to 5m bars then you will have readings for all of your indicators for every 5 minutes as far back as it goes with the amount of rows that you populate. You can then copy all of that data from the SC spreadsheet inside trhe program and paste it to an actual excel spreadheet to do analysis and calculation on.

Example:
Say you want to know the average distance of price (in ticks) from the 200 period moving average of a 1 hour chart on Fridays between 1-2pm. You get all the price and moving average readings from the SC spreadsheet and in excel you simply filter for the day and time period you want. Find the difference for each row, then get the average. Create an average for when the price is below the 200 and an average for when it is above by splittign up the positive and negative values. before averging. Now you have new information and can start building a database of things like this for the instruments you trade. It gets very tedious at a certain point when you have a lot of data, but you can take this pretty far and excel can do a lot. There are free statistical add-on packages you can use in excel that are great for strategy development.

This is very basic for long time excel users so if I am over-explaining I apologize. I find it to be extremely useful and some never give it a chance so I thought I'd share

Reply With Quote
Thanked by:




Last Updated on September 30, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts