
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Dear TimNeuer
I have update previous code ; the update are changing draw trendline instead rectangle . Please aware you need to copy and replace code below into your ea ( simply copy all and replace all ) . If the ea detect something else then ea wont work .
If you done correctly , the ea should work something like below ;
As shown gif file above , if open less then close then the trendline color are Blue ( assume bullish ) meanwhile if open more then close then trendline color Red( assume bearish ) .
By the way feel free to studies my code and be creative .
p/s please note , iam using value high , for better reading and ploting trendline i recommend to use priceMid=Low[]+((High[]-Low[0])/2)
regard.
Cosmas
Dear TimNeuer
I have update previous code ; the update are changing draw trendline instead rectangle . Please aware you need to copy and replace code below into your ea ( simply copy all and replace all ) . If the ea detect something else then ea wont work .
If you done correctly , the ea should work something like below ;
As shown gif file above , if open less then close then the trendline color are Blue ( assume bullish ) meanwhile if open more then close then trendline color Red( assume bearish ) .
By the way feel free to studies my code and be creative .
p/s please note , iam using value high , for better reading and ploting trendline i recommend to use priceMid=Low[]+((High[]-Low[0])/2)
regard.
Cosmas
Hey Cosmas, thanks for the effort again. Unfortunately I am still unable to see any trend lines as in the gif you posted. Please take a look at the error messages I get: https://i.imgur.com/G8T3vyx.png
Iam test ea using Tick Data Suite hence i have no issues . I did some test whereby turning off Tick Data Suite option and run the EA and i found out i have the same problem like yours. My conclusions regarding issues Unmatched Data Error most likely related with your historical pair data . To solve this problem you need to provide better historical data for the ea to work .
regards
Cosmas
im a noob to trying to work out how to do the trend line when i mention using tend lines as part of a strategy on EA to close a trade im told i cant if possible i would like to simple have the EA to use the trend lines to close a trade and open the next the trade.
If what you have done would me can you please show me the coding you have done and ill try and use that as my starting point i am looking at paying someone but i keep getting told im limited but when i look at the other EA's that have been made i see they already been made so not sure what to think any help would be greatly appreciate i also apologies if I doing the wrong thing by posting this here instead of making my own.
Here is a standard solution.
You can move the trendline with
ObjectMove();
Function by specifying the point that needs to be moved and it's new anchor point.
You can get the price value with
ObjectGetDouble();
Function so you can compare bid and ask against that price to see if it crossed over.
Well I would have if I were able to...
Played around a little bit more since posting it here earlier and was successful compiling it without any errors or warnings this time. Here you go:
I get a couple of errors trying to compile this. I am using MetaTrader5 and DayOfWeek(), Open[], Time[], Close[] are unknown. What am I missing?
I get a couple of errors trying to compile this. I am using MetaTrader5 and DayOfWeek(), Open[], Time[], Close[] are unknown. What am I missing?
This topic is about MQL4 and is in the MQL4 section. These standard arrays do not exist in MQL5.