Click here to Login





                                                   Testing intraday strategy , but couldn't replicate thru formula.

  0

0
Balaji
2015-05-10 01:25:12


I was trying to backtesting my strategy and but the software is not returning any results or summary. I don't know whether there is any error in the logic or syntax of the usage of the software.

Can you plz correct me ? Here is my strategy.

Buy Rules :
- Buy if the stock has earnings today.
- Stock is up 8% at the open
- Volume is more than 100K at the opening
- Third Bar in 5 mins is up more than 1st bar in 5 mins
- Price > 10
- Buy 4th bar


Sell Rules :
- Sell if the stock crosses less than (opening price - 10 cents)
- Sell if the stock crosses down 21 ema after 2 ticks in 5 mins chart

// Buy rules

Rule1 = GapUp() > 8;
Rule2 = open > 4;
Rule3 = volume > 100000;
Rule4 = Timeframe() == 5;
Rule5 = day() != ref(day(),3);
Rule6 = valuewhen(Rule5,high);

buy = (Rule1) && (Rule2) && (Rule3) && (Rule4) && (Rule6);

// Sell rules

Rule6 = (close) < (open - 0.25);
Rule7 = close < Sma(21);
sell = (Rule6) || (Rule7);

thanks.



QuantShare
2015-05-11 03:57:00

  0

I strongly suggest you analyze your formula in a chart. You can plot each rule on a chart and see what is wrong and what is displaying 0.

For example, this line doesn't make sense and will always return 0 in your case:
Rule4 = Timeframe() == 5;

Since you are buying on the 4th bar, you can write:

- Third Bar in 5 mins is up more than 1st bar in 5 mins (assuming you are selecting 5-min as time frame for your system)

p = perf(close, 1);
Rule4 = p > ref(p, 3);





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
Collar Option Strategy
Global Market Rotation Strategy V1.4
Intraday Trading System with Daily Ranking
Adaptive Strategy Indicator
FRAMA Adaptive Strategy

How-to Lessons
How to speed up watchlist and screener plug-ins when working with...
How to plot two different time frames in the same chart
How to create a trading system
How to use QuantShare with Metastock data
How to download new quotes when selecting a chart

Related Forum Threads
EOD simulation but intraday stops and targets??
Receate ETFReplay strategy
Beta Testing Quantshare 'Real Time', Forex connectivity issues
MM script: getting Daily prices of index from Intraday Interval
How do I extend my intraday backdated data?

Blog Posts
Optimize a trading strategy using the Sharpe ratio
How to turn any ordinary trading strategy into a very profitable ...
How to Backtest an Intraday Stock Trading System with EOD Ranking
Trading the Strategy Equity Curve
How to Backtest a Strategy from a Chart









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.