Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jeffersondaarcy

Trying to Learn EasyLanguage, but Stuck

Recommended Posts

Hey Guys,

I've spent the past week reading through the available online EasyLanguage PDFs in hopes of eventually creating some basic scans to help filter tradeable stocks. As an exercise, I figured I would create a ShowMe with a few conditions. The main condition is that the "last" is 10% greater than yesterday's close. I cant get this to work for the life of me. I have attached the code I am working with and a few screenshots of the ShowMe. You'll notice one of the screenshots is for a stock that is up 8% (not 10%). No clue why this stock meets the conditions. Any and all help, advice, etc. would be greatly appreciative to this newbie.

 

Variables:

FoundPattern( False );

 

Value1 = ((high+low)*.5);

 

Condition1= last>(close[1]+(Close[1]*.10));

Condition2= Volume[1]>300000;

Condition3= last>2 and last<60;

 

if Condition1 and condition2 and condition3 then

begin

foundpattern=true;

end;

 

if foundpattern then

begin

plot1 (value1);

end;

 

Thanks again.

Code.JPG.6f57030d734e930cc30acc2a0ce5e5f4.JPG

ALGN.JPG.ac6c90e4e6f5031b2a88dc2c71ec6f9b.JPG

Aria.JPG.f9367423b05170c2ba62ea4e295aee14.JPG

Share this post


Link to post
Share on other sites

try this:

 

if Condition1 and condition2 and condition3 then

begin

foundpattern=true;

end

else

begin

foundpattern=false;

end;

 

 

It is possible that the conditions were met at one point during intrabar,

but the scenario has changed by the end of the bar.

Thus you need the "escape clause".

 

 

 

p.s. I would avoid using the generic variables (value1, condition1, etc.).

They are convenient, but makes debugging difficult.

 

 

 

.

Edited by Tams

Share this post


Link to post
Share on other sites

p.s.

 

replace LAST with CLOSE

 

"CLOSE" is the last traded price.

 

"LAST" is also the last traded price.

LAST is designed to be used in a quote field, it does not reference historic data, therefore might not be usable in an analysis.

 

 

.

Edited by Tams

Share this post


Link to post
Share on other sites

Hi Tams,

Thanks for helping me out, I really I appreciate. I incorporated the escape clause and cleaned up my variables, so my code is tighter. I now have a new issue though. The screenshot speaks for itself (look at $26). Both versions of the below code give me the same plot result. Any suggestions in regards to where I am going wrong?

 

In regards, to your "last" vs. "close" post, I was hoping to run scans (via TS scanner) during trading hours; therefore, I was planning on using "last." Are their any issues with "last" and scans that I dont know about (I dont subscribe to Radarscan).

 

VERSION1

Variables: SMDot((high+low)*.50), FoundPattern(False);

 

Condition1= last>(close[1]+(Close[1]*.10));

Condition2= Volume[1]>300000;

Condition3= last>2 and last<60;

 

if Condition1 and Condition2 and Condition3 then

begin

FoundPattern=true;

end

else

begin

FoundPattern=false;

end;

 

if FoundPattern then

begin

plot1 (SMDot);

end;

 

VERSION2 (only difference between V2 and V1 is that V2 has an "escape clause" for the plot section as well)

 

Variables: SMDot((high+low)*.50), FoundPattern(False);

 

Condition1= last>(close[1]+(Close[1]*.10));

Condition2= Volume[1]>300000;

Condition3= last>2 and last<60;

 

if Condition1 and Condition2 and Condition3 then

begin

FoundPattern=true;

end

else

begin

FoundPattern=false;

end;

 

if FoundPattern then

begin

plot1 (SMDot);

end

else

begin

noplot(1);

end;

 

Thanks again Tams

ALGN2.JPG.98edcc5c848834d9624845d8a0df0ed7.JPG

Share this post


Link to post
Share on other sites

LAST is designed to be used in a quote field, it does not reference HISTORIC data.

 

 

 

 

HELLLLLOOOOOO... are you currently looking at LIVE data or HISTORIC data?

Edited by Tams

Share this post


Link to post
Share on other sites

you can simplify this

 

if Condition1 and Condition2 and Condition3 then

begin

FoundPattern=true;

end

else

begin

FoundPattern=false;

end;

 

 

to

 

FoundPattern = Condition1 and Condition2 and Condition3;

Share this post


Link to post
Share on other sites

Thanks Tams. I am looking to compare live data (the price of the last completed trade of a specific stock) to historical data (the previous day's close). I would like to be able to use this ShowMe study in the scanner during market hours to find tradeable opportunities.

 

I incorporated the changes and it appears the original issue is back (see screenshot).

 

Variables: SMDot(0), FoundPattern(False);

 

SMDot= ((high+low)*.50);

 

Condition1= last>(close[1]+(Close[1]*.10));

Condition2= Volume[1]>300000;

Condition3= last>2 and last<60;

 

FoundPattern= Condition1 and Condition2 and Condition3;

 

if FoundPattern then

begin

plot1 (SMDot);

end

else

begin

noplot(1);

end;

 

Judging by your responses, I assume this issue is a result of "last?"

 

Thanks

algn3.JPG.de34b64a5f065be1ae0de7538ba878c5.JPG

Share this post


Link to post
Share on other sites
...

In regards, to your "last" vs. "close" post, I was hoping to run scans (via TS scanner) during trading hours; therefore, I was planning on using "last." Are their any issues with "last" and scans that I dont know about (I dont subscribe to Radarscan).

 

 

 

 

p.s.

replace LAST with CLOSE

"CLOSE" is the last traded price.

"LAST" is also the last traded price.

LAST is designed to be used in a quote field, it does not reference historic data, therefore might not be usable in an analysis.

.

 

 

 

are you making a quote field? or are you doing analysis ?!?!

Share this post


Link to post
Share on other sites

Herein lies my confusion: The code references the "close" of yesterday's daily bar (close[1]); therefore, if I use "close" in regards to today, will the scan still work since technically the daily bar for today wont have a "close" for another six hours (assume it is 10:00am Eastern)? That is why I used "last," because I need the up-to-the-second price when running a scan (which is based off the ShowMe that identifies stocks that are up 10% or more on the day).

 

I obviously misconstrued something along the way when reading through the EasyLanguage PDFs. Your clarification is greatly appreciated. Thanks again.

Share this post


Link to post
Share on other sites

EasyLanguage is NOT English.

 

 

EasyLanguage is "English like".

 

 

do not put preconceived English meanings into EasyLanguage definitions.

 

 

 

.

Edited by Tams

Share this post


Link to post
Share on other sites
...I obviously misconstrued something along the way when reading through the EasyLanguage PDFs. Your clarification is greatly appreciated. Thanks again.

 

 

yes, you have obviously misconstrued something along the way.

 

Read my posts again. Everything you needed is there.

 

 

or if you prefer, you can refer to the EasyLanguage Dictionary for exact definitions and examples.

 

 

Good luck.

Edited by Tams

Share this post


Link to post
Share on other sites

Tams, as mentioned in the first post, my main intentions with the ShowMe study was simply to practice EasilyLanguage in hopes of becoming somewhat proficient. Scanning for stocks that are up 10% was simply an exercise I created for myself to test my understanding of EL. I guess I could have done a better job of explaining that.

 

I can read and re-read the definition of "last" or "quote field" a million times and they're never going to make sense to me. I'm obviously programming illiterate. My confusion isn't due to lack of effort. A simple explanation of "last," "quote field," and the programming relationship between "live and historic data" would be incredibly appreciated. I'm just looking for some help and trying to learn, that's all.

Share this post


Link to post
Share on other sites

I will give it one more effort...

 

please answer the questions to posts #5 and #9

 

 

 

computer is very dumb... so don't give any "if" or "but"...

Share this post


Link to post
Share on other sites

Thanks Tams

 

#5: My goal is to eventually be able to scan during market hours and find stocks that fit a specific set-up. For example, I would like a scan to be able to pick-up a stock that is within .5% of a gap that was created a month ago. Identifying the gap would be based off of historical data but knowing the gap is about to be breached would be based off of live data (correct? Do I have this right?).

 

#9

I am analyzing all stocks via the scanner (using my EL code) to identify stocks that fit a certain set-up (determined by EL code).

 

I may also use this code as an analysis technique on a specific chart.

 

Hope this made sense. Thanks again.

Share this post


Link to post
Share on other sites
Thanks Tams

 

#5: My goal is to eventually be able to scan during market hours and find stocks that fit a specific set-up. For example, I would like a scan to be able to pick-up a stock that is within .5% of a gap that was created a month ago. Identifying the gap would be based off of historical data but knowing the gap is about to be breached would be based off of live data (correct? Do I have this right?).

 

#9

I am analyzing all stocks via the scanner (using my EL code) to identify stocks that fit a certain set-up (determined by EL code).

 

I may also use this code as an analysis technique on a specific chart.

 

Hope this made sense. Thanks again.

 

 

you are NOT answering the questions.

 

have a nice day.

 

;-)

Edited by Tams

Share this post


Link to post
Share on other sites

It will take some considerable time and effort to learn EasyLanguage (EL) but it really is the easiest of the major trading program languages. The great thing about EL is the tremendous amount of educational material and support available. Also, just when you think you have learned everything, you discover a whole new level of complexity available.

 

Anyway, the best way to get started is the two courses sold by Tradestation. "The EasyLanguage Home Study Course" and "Mastering EasyLanguage for Strategies". A good companion while going through these two courses is "EasyLanguage Essentials" also sold by Tradestation.

 

Once you have a basic understanding of what is going on, the Tradestation WIKI is a great learning tool, and free.

 

There are also numerous books that include EL code to demonstrate concenpts from the books. A good one is "Building Winning Trading Systems with Tradestation" available from Amazon.

 

If you really want to create your own indicators, screens, and strategies it is going to take hundreds, perhaps thousands of hours of study and hard work to get far enough along to start doing cool stuff.

 

If you are not really that interested in programming, you would be better off to hire a Tradestation programmer to construct any indicator, screen or strategy you can imagine.

Share this post


Link to post
Share on other sites

"Last (Reserved Word) -

 

A quote field that returns a numeric expression representing the price of the last completed trade.

 

Note Quote fields do not reference history. In Chart Analysis, they will only plot a value from the current bar forward."

 

Why not try "Close" rather than "Last?"

Share this post


Link to post
Share on other sites

Last is the last traded price of the day. If you plot last on your chart then you will get a horizontal line at that price.

 

Close is the closing price of the bar. If you plot this you will get a line that goes up and down with each bar assuming the closing prices on bars are different as they normally are.

 

Charlton

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • How's about other crypto exchanges? Are all they banned in your country or only Binance?
    • Be careful who you blame.   I can tell you one thing for sure.   Effective traders don’t blame others when things start to go wrong.   You can hang onto your tendency to play the victim, or the martyr… but if you want to achieve in trading, you have to be prepared to take responsibility.   People assign reasons to outcomes, whether based on internal or external factors.   When traders face losses, it's common for them to blame bad luck, poor advice, or other external factors, rather than reflecting on their own personal attributes like arrogance, fear, or greed.   This is a challenging lesson to grasp in your trading journey, but one that holds immense value.   This is called attribution theory. Taking responsibility for your actions is the key to improving your trading skills. Pause and ask yourself - What role did I play in my financial decisions?   After all, you were the one who listened to that source, and decided to act on that trade based on the rumour. Attributing results solely to external circumstances is what is known as having an ‘external locus of control’.   It's a concept coined by psychologist Julian Rotter in 1954. A trader with an external locus of control might say, "I made a profit because the markets are currently favourable."   Instead, strive to develop an "internal locus of control" and take ownership of your actions.   Assume that all trading results are within your realm of responsibility and actively seek ways to improve your own behaviour.   This is the fastest route to enhancing your trading abilities. A trader with an internal locus of control might proudly state, "My equity curve is rising because I am a disciplined trader who faithfully follows my trading plan." Author: Louise Bedford Source: https://www.tradinggame.com.au/
    • SELF IMPROVEMENT.   The whole self-help industry began when Dale Carnegie published How to Win Friends and Influence People in 1936. Then came other classics like Think And Grow Rich by Napoleon Hill, Awaken the Giant Within by Tony Robbins toward the end of the century.   Today, teaching people how to improve themselves is a business. A pure ruthless business where some people sell utter bullshit.   There are broke Instagrammers and YouTubers with literally no solid background teaching men how to be attractive to women, how to begin a start-up, how to become successful — most of these guys speaking nothing more than hollow motivational words and cliche stuff. They waste your time. Some of these people who present themselves as hugely successful also give talks and write books.   There are so many books on financial advice, self-improvement, love, etc and some people actually try to read them. They are a waste of time, mostly.   When you start reading a dozen books on finance you realize that they all say the same stuff.   You are not going to live forever in the learning phase. Don't procrastinate by reading bull-shit or the same good knowledge in 10 books. What we ought to do is choose wisely.   Yes. A good book can change your life, given you do what it asks you to do.   All the books I have named up to now are worthy of reading. Tim Ferriss, Simon Sinek, Robert Greene — these guys are worthy of reading. These guys teach what others don't. Their books are unique and actually, come from relevant and successful people.   When Richard Branson writes a book about entrepreneurship, go read it. Every line in that book is said by one of the greatest entrepreneurs of our time.   When a Chinese millionaire( he claims to be) Youtuber who releases a video titled “Why reading books keeps you broke” and a year later another one “My recommendation of books for grand success” you should be wise to tell him to jump from Victoria Falls.   These self-improvement gurus sell you delusions.   They say they have those little tricks that only they know that if you use, everything in your life will be perfect. Those little tricks. We are just “making of a to-do-list before sleeping” away from becoming the next Bill Gates.   There are no little tricks.   There is no success-mantra.   Self-improvement is a trap for 99% of the people. You can't do that unless you are very, very strong.   If you are looking for easy ways, you will only keep wasting your time forgetting that your time on this planet is limited, as alive humans that is.   Also, I feel that people who claim to read like a book a day or promote it are idiots. You retain nothing. When you do read a good book, you read slow, sometimes a whole paragraph, again and again, dwelling on it, trying to internalize its knowledge. You try to understand. You think. It takes time.   It's better to read a good book 10 times than 1000 stupid ones.   So be choosy. Read from the guys who actually know something, not some wannabe ‘influencers’.   Edit: Think And Grow Rich was written as a result of a project assigned to Napoleon Hill by Andrew Carnegie(the 2nd richest man in recent history). He was asked to study the most successful people on the planet and document which characteristics made them great. He did extensive work in studying hundreds of the most successful people of that time. The result was that little book.   Nowadays some people just study Instagram algorithms and think of themselves as a Dale Carnegie or Anthony Robbins. By Nupur Nishant, Quora Profits from free accurate cryptos signals: https://www.predictmag.com/    
    • there is no avoiding loses to be honest, its just how the market is. you win some and hopefully more, but u do lose some. 
    • $CSCO Cisco Systems stock, nice top of range breakout, from Stocks to Watch at https://stockconsultant.com/?CSCOSEPN Septerna stock watch for a bottom breakout, good upside price gap
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.