Read Lines on Chart and close trades and no trade
-
Hi @fxDreema
I need to do that to add a News Filter to my EAs
I have the indicator News Call that reads news from the ForexFactory or Daily FX feed
That indicator shows some lines of different colors that advance until the current time,
which indicate that the moment of news is coming.
The reds are high impact, there are medium and low impact.
I want the EA to read those lines, and do this:
Close profitable operations of more than 5 pips when there are 20 minutes left before the news
Turn off the buy and sell module.
When 60 minutes pass, turn on the buy and sell modules.
I've been looking for info and indicators for weeks but I can not do it
I will upload the indi and a diagram of how I want to do it.
Thanks and best regards!!
https://fxdreema.com/shared/K0IktNmjc
I think I almost have it ....
But I need the EA to detect the vertical lines
-
-
This indicator has only 1 output buffer that is also Black, is there something in this buffer that can be used somehow? Otherwise there is bunch of objects that are created. I actually don't know what information such as "USD FOMC Member Dudley Speaks" means for the EA - is this buy or sell signal? :)) After all, the EA is just a program that understand only mathematics and numbers.
-
@winidecorw said in Read Lines on Chart and close trades and no trade:
Hi @fxDreema
Hi @fxDreema
I commented:
What I want is that:
When a vertical red line appears, no matter what indicator it comes from, the lines will (really come from that indicator,) what I want is that when there is strong news, close the profitable operations, and there will be no more operations in 1 hour or 2 ..
Now, to test, I'm testing with this indicator, which draws lines in the chart at what times:
0_1519400682623_vertical_time_lines - copia.mq4
[0_1519400836152_ver lines set2.set](Uploading 100%)Look how I wear it:
https://fxdreema.com/shared/TV1LpVKqeIt is not necessary to include the indicator within the EA
It is enough for the EA to detect the red vertical lines, close operations with a minimum profit of 1 pip
And do not open more operations in 1 or 2 hours
-
The set for the indi for all lines red
https://drive.google.com/file/d/1uZP4YXciJZgJ-vICeAsIpgo_s7NOoQpL/view?usp=sharing
-
It really is not when the line appears, but when the price bar reaches it
-
No trade and stop trade in 1 h
Or turn off the buy and sell blocks and turn on in 1h
I test everything, and I do not get it....
https://fxdreema.com/shared/YyaPP0Tod -
Well, lines are chart objects and as you probably know, all objects can be found in one "pool" of objects where each one has unique name. So here are the ways to find certain object - https://fxdreema.com/examples#Chart-Objects You either have its exact name and you can get it directly, or you search for the right object. Then, when you select the object you can also get its value - Price, Time, whatever.
You have some "For each Object" blocks in your project, but I don't see their purpose there. They would select each object, even if it is some arrow or label somewhere on the chart. So what these blocks do for you is only to slow down the backtest of the EA
