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. I've been writing my own code in Power Language for about 10 years now. But there is one big problem I have that I am willing to pay someone to solve. I need a program that can be automated to Buy/Sell based on the steepest trendlines over 3 bars or more, of fixed-tick bars (say they are 1000 ticks).
I already have an automated program that does well, based mostly on Moving Averages. But, I've found that if I manually draw the uptrend/downtrend lines between these 3 (or more) bars, to get the steepest one, and *going in the same direction* as a certain moving average that I use over these bars, I can get much better results. The difficulty is keeping up with a fast-moving market. Thus, it needs to be an automated program.
I have over 4 years of tick data of the ES for historical backtesting. Everything I code is backtested over this period. The trendlines do not have to be drawn on the chart. Just the formulas that produce them need to be developed. I can then check the results of the code by manually drawing the needed trendlines to compare with what the new code says to do.
If anyone is interested, and is pretty certain they can do it, then please PM me.
Thanks,
Bob Baker
P.S. I don't have MultiCharts.net -- just the regular MultCharts.
Theres a problem though with "drawing" trendlines in algorithms. Computers dont really see things in the way we do,
with scaling you could draw any trend line you want really.
You'll probably find that you have to use a more mathematical approach, for example it is possible with trigonometry to measure angles between equally spaced points.
Or Rate of Change or Linear Regression might be used.
Anyways, just my 2c
welcome to ping me if you wanted to chat.
I did post some code a while back that might be helpful to this. It does draw lines like an indicator (not using trendline function, which can be hard to access future cross values in a strategy). It uses a similar approach as a swing indicator which means it falls under the same downfalls of a swing indicator. Must wait a certain amount of bars after swing, and therefore trendline confirmation. Once you have two points on the line, its easy to calculate any future value and set limit or stop orders accordingly (y=mx+b).
I guarantee that this is not the optimum way to do this, but it works.
Alright I will give this one away. I don't use this anymore. Lookback length is the period you want to look back for the trendline, leftstrength, rightstrength define the bars left and bars right that you want to define a Higher or lower high or higher/lower …
I have not thought about adding it to the downloads section as I do not like the cleanliness of the code. I think it needs some cleanup and some additional input selections for code reset. I am an engineer and tend to do things in the most efficient way that I can think of at the time. Sometimes this translates poorly to others. The purpose of my programming is for my trading only and I don't really have the time to spend cleaning things up for publication. Not trying to be rude.
That being said, anyone is welcome to take this and clean it as they see fit and post it as their own. Honestly I took the bones of this from some swing indicator that I found somewhere long ago. I couldn't even try to site that person at this time. I hope it helps someone down the road, and they continue to pass on things that they have learned.
I can recommend Lee Liebfarth with Powerzone Trading. Lee is highly knowledgable with Tradestation EasyLanguage and can solve your problem I am sure. Lee has done programming for me over 10years.