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)
Hello All,
im new to the forums and to trading, I use Tradestation and im looking to write a scan, ive included photos of what i want the scan to accomplish and a brief explanation, i was wondering if someone could help me out with this idea, as i have no programming experience at all and am new to easy language....
In preparation for the next buying opportunity,
1. A stock touched its upper Autoenvelope within the past 26 bars
2. That stock is now under its 26-bar EMA OR has been under it within past bar
PS: the chart above in FMC weekly
PPS: the autoenvolope is part of and indicator package that i purchased from Dr. Alexander Elder
thanks in advanced
Can you help answer these questions from other members on NexusFi?
the first thing that you need to make sure is that you can either access the code for the Autoenvelope or have a function (that can be closed code) that makes those values accessible. Otherwise you wouldn't be able to use the
value for the Autoenvelope within your code.
you can look at the code in the Development Environment directly. Another approach is when you have the indicator applied to a chart, go to "Format" -> "Analysis Techniques", highlight the particular indicator and click on "Edit EasyLanguage". This will open up this indicator in the Development Environment directly.
there is a bit of a problem here as I don't know how the indicator operates and what the variables are named. As it's probably copyrighted material, I wouldn't suggest posting it.
What you will have to do is along the line of this:
Check if the Low of the current bar is below the EMA. I suspect you are referring to an EMA with length 26, as the EMA doesn't use bars for the length like a simple average for example.
Within the below check of Low < myEMA, that would check for the Low of the current bar being lower than the EMA, I'd suggest to create a loop and cycle through the last 26 values for the upper Autoenvelope and check if a High of that bar touches that value.
You can check previous bars values of a reserved word or variable via brackets - High[1] is the high from 1 bar ago etc..
If you find a touch, you have a valid signal and can plot this on the chart as a dot for example.
Regards,
ABCTG
The following user says Thank You to ABCTG for this post:
ABCTG,
im not sure what you mean by loop?, and i can pm the autoenvlope to u well what i see wen i hit edit easy language, i speak to Dr Elder regularly, i asked him about it he's cool with me showing you that part if your willing to look at it for me.
I would suggest to take a look at the EasyLanguage Essentials guide. It will cover all the basics you need to know to write the code based on the idea I outlined below.