NexusFi: Find Your Edge


Home Menu

 





Writing scan in tradestation


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,687 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
newmoney87
st.louis missouri united stated
 
Posts: 4 since Feb 2017
Thanks Given: 0
Thanks Received: 0

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


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


newmoney87,

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.

Regards,

ABCTG


Follow me on X Reply With Quote
  #4 (permalink)
newmoney87
st.louis missouri united stated
 
Posts: 4 since Feb 2017
Thanks Given: 0
Thanks Received: 0

@ABCTG how would i go about finding out if i have access to the code?


Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

newmoney87,

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.

Regards,

ABCTG


Follow me on X Reply With Quote
  #6 (permalink)
newmoney87
st.louis missouri united stated
 
Posts: 4 since Feb 2017
Thanks Given: 0
Thanks Received: 0

ok i see it i can edit the easy language of the autoenvolope


Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

newmoney87,

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.

 
Code
Variables:
double myEMA ( 0 );

myEMA = XAverage( Close, 26 );

//low of the bar is under the EMA
if Low < myEMA then
begin
//the loop would be in here

end ;
Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #8 (permalink)
newmoney87
st.louis missouri united stated
 
Posts: 4 since Feb 2017
Thanks Given: 0
Thanks Received: 0

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.

thank you !


Reply With Quote
  #9 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

newmoney87,

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.

Regards,

ABCTG


Follow me on X Reply With Quote




Last Updated on February 22, 2017


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts