NexusFi: Find Your Edge


Home Menu

 





Writing scan in tradestation


Discussion in EasyLanguage Programming

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




 
Search this Thread

Writing scan in tradestation

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
Increase in trading performance by 75%
The Elite Circle
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
18 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


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 Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter Reply With Quote




Last Updated on February 22, 2017


© 2024 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 - Privacy Policy - Downloads - Top
no new posts