Click here to Login





                                                   HOW to write rule?

  0

0
felik
2010-05-23 07:52:31




2) is it possible to write syntax/ rule/ array for the following- stocks with 10and 20 and 30 sma turned up over last n no of day ?Next is for rsi ;
rsi turning up after remaining below30 or flat or negative over last 3days
3) Stocks up 20 % from their last highest high of n no of days ( n may be 10 /20 etc)
4) Stocks down 20 % from their highest high of n no of days
5) Is there any syntax or array to define resistance and support??



QuantShare
2010-05-24 06:51:36

  0

Best Answer
SMA 10, 20 and 30 bars turned up in the last 5 bars:
roc(sma(10), 5) > 0 and roc(sma(20), 5) > 0 and roc(sma(30), 5) > 0 and ref(roc(sma(10), 5), 5) < 0 and ref(roc(sma(20), 5), 5) < 0 and ref(roc(sma(30), 5), 5) < 0

RSI turning up after remaining below30 or flat or negative over last 3days:
rsi(14) > ref(rsi(14), 1) and (istrue(rsi(14) < 30, 3) or roc(rsi(14), 3) 1.2 * ref(hhv(high, 20), 10)

Stocks down 20% from their last 20-bar highest high, 10 days ago:
high < 0.8 * ref(hhv(high, 20), 10)

Horizontal resistance can be defined as the highest close value over N-bar
hhv(close, N)



felik
2010-05-24 14:22:45

  0

Of the above two rules can they be converted into an indicator or trading package with additional condition of and volume 3times of last day vol


QuantShare
2010-05-26 06:37:43

  0

Here are the steps to follow in order to create a trading indicator from the a vector-based formula.

- Select "Tools" then "Create functions".
- Click "Add" and type in your indicator name
- Select the indicator in the left panel
- Type in the following code:
result = cFunctions.CompileFormula("a = rule;").GetVectorDouble("a");
- Replace "rule" by your own rule
- Click on "Save".



felik
2010-05-27 08:34:16

  0

wow thanks u have all solutions



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
How far are the close prices from the support line
Close Price Above Cursor
Number of bars up to the end of the month
Minimum Variance Optimization with Solver V1.1- AMM
Backtest different Segments in your Trading System

How-to Lessons
How to plot put/call ratio of individual stocks
How to drag & drop indicators in charts
How to create histogram charts
How to add a trading indicator to a chart
How to plot the number of stock tweets per day

Related Forum Threads
how t0 write rule
How do I refer to the close price of another symbol in a formula?
to write and execute an Indicator
Looping within a screener and how to use RemoveSameSignals
How to obtain volatility of all the stocks in the portfolio?

Blog Posts
How to create and backtest thousands of trading rules in less tha...
How scripts communicate with each other
Let me Show You How to Create Hundreds of Profitable Trading Syst...
How to Pick the Best Trend Indicators
Learn How to Create Your Own Technical Analysis Indicators









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.