Entering trades based on object on charts (lines drawn by indicator)?
-
Hello,
I'm trying to build an EA which enters a trade when it is above the "DLB#1-0-hi" line which is drawn daily (after 6:00h my server time).
The trades should closed by an opposite BB Stop signal.Unfortunately I cannot manage to build it properly it doesn't enter any trade.
It's also imortant to note that it only should trade after 6:00h until 21:00) cause the levels/range box is drawn daily until 6.00h you can see it here.
-So how do I make the EA indentifying the levels correctly?
-And how does the time filter work properly cause, for instance, I don't the exiting (via the BB Stop signal) to stop after 21.00h?Attached are all the files


0_1525607919606_BBand Stop Alert.ex4 0_1525607934770_DailyLinesBoxes.mq4 0_1525608152338_DBoxes test 1.mq4 -
I think this will work about right:

Notice the different "route" for exit - if your exit condition was after the buy, the trades would close instantly after opening (or not at all).
https://fxdreema.com/shared/WolKfEaEc -
Unfortunately thats not what I meant, the lines are drawn by an indicator, when I test your build the indicators doesn't appear.
I've did a new try but still not working, the indicator for exiting isn't even loaden into the EA (I don't know why).
And still no trades.
What have I done wrong?
-
Can nobody help me with this?
-
maybe this can help you ..
https://fxdreema.com/forum/topic/4209/tutorial-07-read-prices-from-indicator-objects -
Honestly you were quite right, I just had to emove the Condition object is not 0 and had to load the indicator onto the visual backtesting chart.
I'm sorry it was my fault.
Best regards“and thanks for your help.
-
I have figured it out now, I just didn't know that you can put the indicator simply onto the backtesting chart without putting it into the EA itself.