Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 02-06-2011, 05:11 PM   #9

Join Date: Nov 2010
Posts: 92
Ignore this user

Thanks: 25
Thanked 59 Times in 34 Posts

Re: Can't Follow the Code, Please Help....

you start by cutting down to a few line of codes, run them , see the result then add back a few lines do it again and again and again.

Last edited by Corey; 02-06-2011 at 05:16 PM.
Corey is offline  
Reply With Quote
Old 02-06-2011, 05:36 PM   #10

Join Date: Feb 2010
Location: austin
Posts: 7
Ignore this user

Thanks: 2
Thanked 1 Time in 1 Post

Re: Can't Follow the Code, Please Help....

Hi Feng,
Do you know what the function "swingHighBar(...)" does? also you need to understand this notation "H[possibleHighBarsAgo];" spend some more time studying the code.

If you know what the purpose of the overall strategy is supposed to do then viewing the code is alot easier. I believe you dont understand this comment from the original code "This plots swing highs/lows with a strength of 2 bars on each side, on the condition that there is a close above/below the high/low the bar after the said swing bar......whew that's a mouthful!"
mushin2003 is offline  
Reply With Quote
Old 02-06-2011, 05:59 PM   #11

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,778
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Can't Follow the Code, Please Help....

Quote:
Originally Posted by feng2088 »
Hello , I am trying to understand these codes line by line. I spent 2 hrs try to figure out what each line does, obviously I couldn't figure out. ...
spent 2 hours ???? and you expect to know it all ???

you can do that if you are a programmer.
try 20 hours if you are not.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 02-06-2011 at 06:11 PM.
Tams is offline  
Reply With Quote
Old 02-06-2011, 06:02 PM   #12

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,778
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Can't Follow the Code, Please Help....

Quote:
Originally Posted by feng2088 »
Thank you all for your advice. I downloaded the EasyLanguage Essentials and read some pages of it. I put some comment on a few lines but not sure if I understand the codes correctly. Can your guys please take a look? For the ones that have ?? at the end , can you please shred some lights? Thank you for your time and help. Enjoy your weekend.
...
get a piece of paper...
draw a flow chart as you go.
don't forget, you are dealing with a "system" here.
this is not as simple as a few sentences' worth of explanation.
but if you have patience and trace through the process,
you will find the logic is not that difficult.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 02-06-2011, 08:41 PM   #13

Join Date: May 2010
Posts: 31
Ignore this user

Thanks: 0
Thanked 20 Times in 14 Posts

Re: Can't Follow the Code, Please Help....

Hello Feng,

You do have to spend a lot more than two hours to learn EasyLanguage programming. Let me try to help you understand this code a little better.

First, open the tradestation Help and in the search tab put in swingHighBar. That'll give you a page that explains what this function does exactly, and what the different input parameters mean. Essentially it'll give you the bar number for the swing high.

H[2] means the high of two bars ago, it does not mean that the high is 2. Numbers or variables inside square brackets tell you how many bars ago to reference.

Your question about the if - the code is checking if the most recent swing high is lower than the prior highest swing level, which I believe is then used by the program to determine that the uptrend is over.

You really need to commit to spending more time learning EasyLanguage, there are simply no shortcuts to that. And I fear you may be setting yourself up for a hard time in the markets if you think all you need is some free trading strategy and a couple of hours time to get started. Buckle down and invest the time to learn, start with the simple code examples in the tradestation tutorials, write your own simple strategy and test it out, do some demo trading, and if after all of that you think that you have a winning strategy, then go ahead and trade real money. And be prepared to deal with losing trades because they will come and are an unavoidable element of trading.

Good luck in your studies.
TraderWill is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Anyone Use a Smartphone to Follow the Markets and the News... HighStakes Tools of the Trade 11 05-27-2011 12:16 PM
ADE Code karsat Coding Forum 0 03-08-2009 08:06 PM
P&F Code point-figure Coding Forum 0 02-17-2009 06:24 AM
Follow The Smart $$: Let Candles & Volume Guide The Way brownsfan019 The Candlestick Corner 16 01-13-2009 10:27 PM
Hey Guys, just follow the smart money ¡¡ walterw General Discussion 2 03-22-2007 07:54 PM

All times are GMT -4. The time now is 11:33 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.