Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
My idea is to build an EA that will take a user input for a resistance and a support trendline by either inserting 2 price & time points for each line or by simply drawing on the chart (if possible that would be absolutely awesome). If slopes are negative the algorithm would automatically go short when at or near resistance (user chooses actual number of pips or a percentage of the pip distance between resistance & support lines) and close that position at/near support, etc for uptrending/lateral markets.
I've been trading this strategy manually on the daily EUR/USD chart and have been quite satisfied with the results. The pain is having to be watching closely when close to those levels, so an algorithm would be a greatest hand. I'm a complete beginner with respect to coding, so I totally welcome your help.
I can see that the resistance/support inputting is going to be my greatest challenge, so if you have an idea of how to do that please let me know!
As soon as I have something coded I'll make sure to post it! (code included..!)
Last edited by renegado; 03-17-2009 at 06:21 PM.
Reason: Correcting nomenclature
The problem with methods is that the trendlines will always be subjective, unless you choose particular trend lines of certain distances from current Time[0]
If you want to even start this project, I suggest you extensively define your definition of trendlines, not just the most recent high high and low low or high low, and low high.
It may be possible to just draw the line on the chart at the points you like them and have the EA act upon it. The trick is to name the line to a name that the EA will look for and if it exist will then act upon it as you would like (that is, programed it to act).
Keit
Quote:
Originally Posted by renegado
My idea is to build an EA that will take a user input for a resistance and a support line by either inserting 2 price & time points for each line or by simply drawing on the chart (if possible that would be absolutely awesome). If slopes are negative the algorithm would automatically go short when at or near resistance (user chooses actual number of pips or a percentage of the pip distance between resistance & support lines) and close that position at/near support, etc for uptrending/lateral markets.
I've been trading this strategy manually on the daily EUR/USD chart and have been quite satisfied with the results. The pain is having to be watching closely when close to those levels, so an algorithm would be a greatest hand. I'm a complete beginner with respect to coding, so I totally welcome your help.
I can see that the resistance/support inputting is going to be my greatest challenge, so if you have an idea of how to do that please let me know!
As soon as I have something coded I'll make sure to post it! (code included..!)
The problem with methods is that the trendlines will always be subjective, unless you choose particular trend lines of certain distances from current Time[0]
If you want to even start this project, I suggest you extensively define your definition of trendlines, not just the most recent high high and low low or high low, and low high.
But I don't want the trendline picking to be a mechanical process because I especially enjoy doing that part! I understand that it becomes a bit more complicated to be able to backtest, but I'm ok with that. :
Would you know anything about how the algorithm accesses the names of the the lines we draw and the values associated with it?
It may be possible to just draw the line on the chart at the points you like them and have the EA act upon it. The trick is to name the line to a name that the EA will look for and if it exist will then act upon it as you would like (that is, programed it to act).
Keit
Would you happen to have any code examples or suggest some EAs? I'll go after them!
Otherwise, I would like to ask you the same I asked Walander: "Would you know anything about how the algorithm accesses the names of the the lines we draw and the values associated with it?"
start by learning goto the dictionary and read about object funtions and pay mind to the object find function.. when you draw a line on the chart just call it by a name that your ea will be looking for. any ways read and you'll get the idea of what needs done.
start by learning goto the dictionary and read about object funtions and pay mind to the object find function.. when you draw a line on the chart just call it by a name that your ea will be looking for. any ways read and you'll get the idea of what needs done.
CockeyedCowboy
Keit, I've actually JUST found some related code and am really excited about devouring it (I'll do it after reading about objectfind) tonight.
When I end my research can/should I cite my sources (I don't wanna get banned!) or just post the original EA codes?