Click here to Login





                                                   Help with Quantshare Language

  0

0
Yu Jie
2013-11-22 05:34:23


Hi,

I am new here and I would like to create a simple Bullish Engulfing trading strategy:

Buy at Open of tomorrow when:
- Open < Close of previous trading day and
- Close > Open of previous trading day

Sell on the 7th trading day (day at which is bought is the 1st day)

I am using the wizard.

I included 2 rules under the Buy section:
(Close) > Ref(Open,1)
(Open) < Ref(Close,1)

1 rule under the Sell section:
NbDays(5)

Would this be the correct way of doing it? Should I use the formula editor or the wizard?
Can anyone help me thanks!



QuantShare
2013-11-22 18:22:55

  0

Hi,

You should remove the sell rule and an "N-Bar Stop" to exit after a specific number of days.

In the formula editor, the buy rule would be:
buy = close > ref(open, 1) and open < ref(close, 1);

We also have the Bullish Engulfing pattern already implemented:

buy = CdlEngulfing() > 0; // Bullish




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
Stock Correlation with its Industry - Change over time
Long Term Up Trend with Short term re-entery Signals
Update the Stock Exchange Associated With U.S. Stocks - Market Fi...
Minimum Variance Optimization with Solver V1.1- AMM
Intraday Trading System with Daily Ranking

How-to Lessons
How to use QuantShare with Metastock data
How to run QuantShare offline
How to improve the performance of QuantShare databases?
How to install the previous version of QuantShare
How to associate an index with a list of stocks

Related Forum Threads
Quantshare Language Documentation
Help With Daily Data Import Script
How QuantShare interacts with market circuit breakers?
Need help with a MM Script
Help with Survivorship Bias Free DB

Blog Posts
More about QuantShare Programming Language
QuantShare Programming Language Tutorial
Real-Time Quote Sheets with QuantShare
Stock Market Prediction with QuantShare
How to Create an Automated Trading System in QuantShare









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.