Click here to Login





                                                   Backtest equity into chart

  0

0
Alexander Horn
2014-09-29 04:34:52


I want to pass a backtest equity line to a chart, dates aligned with the rest of the chart. What's the best and easiest way to do this?

I started using a Dictionary<DateTime,double> Equity = new Dictionary<DateTime,double>() in an AMM, then to pass through a global var into a function to put it into a VectorD, and then into the chart.

But got stuck aligning dates with bars in the VectorD, and thought there might be an easier way to do this.. Any tip?




Alexander Horn
2014-09-29 04:59:20

  0

And another question, albeit not directly related. How do I plot the different shades, e.g. second color and alphas from a function? Somehow the "|" separator does not work. Like "colorLightGreen|22|colorLightGreen|32|298" but plotting from function.

In chart:
plot1(up, down, "Lev1-Up", "Lev1-low", colorLightGreen|22|colorLightGreen|32|298, colorLightGreen, colorLightGreen, ChartLine, StyleSymbolNone);

In function, missing the second color and alphas:
Chart.Plot1(upperexit , lowerexit , "Entry", "Exit",Color.Transparent,Color.Orange,Color.Orange,ChartType.ChartLine,Style.StyleSymbolNone);



QuantShare
2014-09-30 11:18:24

  0

Best Answer
Hi Alex,

1/ Create a ticker symbol from the equity line (Right click on it then click on "Equity To Symbol").
After that, reference that symbol using "GetSeries" function.

2/ Using two colors can be done only in QS formula



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Equity Data to Ticker Symbol
Equity Trading Based on Position of Moving Average
Equity Export To Excel
Backtest different Segments in your Trading System
Position Sizing: Fixed Percentage of Current Equity

How-to Lessons
How to display two stocks on the same chart
How to plot arrows below/above candlesticks on a chart
How to create a hatched area in a chart
How to create a log scale chart
How to import trades into a portfolio

Related Forum Threads
Import equity curve and backtest equity curve trading strategies
Show Buy-n-Hold on Equity chart of the simulation?
Backtest from a chart not resulting in any trades
Custom index/relative chart for TAA - Sector rotation
Charts,Arrows and backtest reports

Blog Posts
How to Backtest a Strategy from a Chart
How to create and backtest thousands of trading rules in less tha...
How to Backtest an Intraday Stock Trading System with EOD Ranking
How to Backtest Each Stock or Asset Individually
Backtesting chart patterns using the auto support and resistance ...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.