osma trendlines
-
I'm trying to get a robot to buy / sell based on a new trendline appearing on the chart which is drawn by a custom indicator. This is so I can trade osma divergence.
I'm having a lot of trouble getting the robot to see the trendlines. It either seems not to see them or always see them.
I've been through the forum relating to trendlines but cannot find the answer.I've tried various things with the functions:
For each object
Select object by name
Check trendline price levelBut I've not come up with a solution.
Basically the indicator draws trendlines called things like "OsMA_Divergence_v1_TroghPW_1433960280" or "OsMA_Divergence_v1_TroghPW_1433960160"
The troughs have the prefix "OsMA_Divergence_v1_TroghPW_ then number"
And the peaks have the prefix "OsMA_Divergence_v1_PeakPW_ then number"The trendlines are also colour coded as per their function (hidden / classic / bullish / bearish divergence) so there are four colours too which I thought I could target.
As soon as one of these new trend lines appears I'd like to enter a buy / sell trade as they will tend to pick out a low / high point.
I've attached the indicator. If someone could help me find the answer please. Thanks.
......
OsMA_Divergence_v1.mq4 -
Isn't it possible to use the buffers from this indicator? I can see that there are 3 buffers where 1 and 2 are for those gray dots. I didn't checked them, but I guess that they work.
-
I do sort of see what you mean (I hadn't looked into buffers prior to you mentioning it. I'm still not sure I understand them).
I'll have a try using buffers and see how I get on. Thanks.I've put something together using the block for MACD divergence. That's basically exactly how I want it to work but using this custom osma indicator instead of MACD. That's what I'm aiming for. Will let you know how I get on. Thanks.
-
Here I tried to explain buffers: https://fxdreema.com/documentation/you% ... indicators
Also, here is how to add indicators in fxDreema: https://fxdreema.com/documentation/work ... indicatorsBuffers are the way for the EA to communicate with the indicator. The indicator puts data in those buffers and the EA can then read that data.