Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
So I've recently taken a step to make my trading more reliable and hopefully more successful. I am trying out Multicharts and one of the features I wish to use is the backtesting feature. It seems, that to use this feature I have to learn "easylanguage" to write my strategy. So I did some reading on the internet and jumped right in the deep end and wrote my first easylanguage strategy. First the strategy:
Show Stocks where RSI(2) is below 5
and price is above 5.00
and average volume(21) is above 250000
and close reached a new 10 day low
and close less than MA(5)
and close less than MA(200)
and close has been decreasing for 5 days
and where ADX(10) is above 30
This is what I have so far:
Now here are my questions:
1. How do I code this "and price reached a new 10 day low".
2. How do I code this "and price has been decreasing for 5 days."
3. I am having trouble with coding the position size and entries as well as the exits. But I will save that for another post.
4. Essentially when backtesting and maybe in future in automated trading, I want this strategy to pick 4-6 stocks (depending on my current positions and position size) from any of the stocks in the NYSE, NASDAQ or AMEX that fill the criteria. I want the strategy to constantly scan all these stocks and buy the ones that best fulfill my criteria.
So initially I just want to make sure that the strategy criteria are correct first and get some answers.
Can you help answer these questions from other members on NexusFi?
I'm a TradeStation user but I believe the easylanguage code is the same across platforms so see if this helps:
*note: the code below assumes you're using daily bars. If you were not using daily bars then you can use LowD and CloseD to access the daily values on an intraday chart.
1) I would use the "Lowest" function:
2) Probably at least two ways to do this and I'm not sure which method represents what you're after so you can decide:
Method 1: this will only check if the current close is lower than the close 5 periods ago
Method 2: this will ensure the last five consecutive closes are each lower than the previous