Trendline Break
-
(this is an old topic but ... posting for beginners )
Simple Sample Exmple EA - to understand how to draw Trendline and use it to open trade in an EA ( for beginner someone like me )
Use this example only with Demo account and to learn how it is working. I am not responsible for your money losses.
-
Hi FxDreema
I would like to be able to open a trade based on a crossing of a trendline. The trendline that I am using gets dated on a daily cycle.
Having set up the trendline, I cant seem to be able to get the condition block to see the trendline, which I have named as x.I have set up on the platform the blocks to create the trendline, would you be able to check to see why the block is not seeing
the trendline, or to check my settings to recognise the line?Regards.
-
Set this to No: http://prntscr.com/6k2c33
Also, better try crossover with Candle Close, not with Ask. Here you can probably understand why: https://fxdreema.com/documentation/proj ... er%20works -
Hi
I have tried the using candle close, and also pretty much every other permatation, I think its just not seeing the trendline when price breaks above.
In my main code I have already got 1 object per bar set to yes.
If i name the trendline 'x', can you check my condition block to check whether that should see trendline 'x'
Thanks
-
__Set this to No: http://prntscr.com/6k2c33[/quote:2jzn6s0p]
-
I have that block set to yes already
-
Who said "Yes"? I wrote it twice - set this to No, not Yes. No. I mean... NO.
These settings change the way objects appear. You can produce 1 object from this block, or unlimited number of objects.
-
Sorry, my mistake, just looked at the pic.
Have set to no., still not placing the trade.
-
I don't know why you are focused on the trade while the trendline itself is not where it should be in first place. Look at this: http://prntscr.com/6k3ehs
-
Im running on the local version using 2 trendlines, upper and lower, both setting up fine, i knocked up quickly a one trendline version for you to see whether i have set up the object description correctly.
Have tried to add a pic of the trendlines setup, however board attachment quota has been reached showing up, however, my trendlines are opening and closing fine on my local version.
-
Use this for screenshots: http://prntscr.com/ I use it for everything

Using your example with fixed time-price settings, I got some trades opened. With crossover using Ask and also with crossover using Candle Close. So for me it works.
Your project had 2 main problems:
The first one is that the object was created with different name, like x_1, x_2... When you write some name, this is only the base name that will be used. But depending on the top 2 settings, you can create multiple objects using this blocks. When you have multiple objects, they cannot have all the same name
The second problem is that the trendline was not printed correctly. It looked like vertical line.So you have another project. Well, I can't really help for it, because I don't know it. I found 3 issued here on this small example, who knows what else can I find in the original project
But!- To find if some block passes (it does it's job) - connect Draw Arrow after it and watch for arrows on the chart
- To find the value of something (indicator, variable, formula result) - use "Indicator tester" or "Comment on chart"
-
Hi
Thanks for the help.
I could get the ea to place trades using the version that I had sent you, after changing the yes to a no, but could not replicate with an exact copy on the local version. I eventually removed the EA, downloaded the very latest version of FXDreema and now it places trades
correctly.As you pointed out, the version I sent you was just a version I quickly made hence the initial errors, to check that the trades were being placed correctly, my main version takes a feed from 3 other ea's that are number crunching so would have been to complicated to send over.
Agai, thanks for the help.
-
@rp13579 Thank you again for sharing it.