指定
I have a Custom Indicator (Peak & Trough) that I want to interface with ESB (Expert builder)
Critically your Developers Indicator will be able to detect Alerts created by the running Peak & Trough ex5 in the terminal. Have discovered that no alerts work in the Strategy Tester. Therefore all testing in this mode will have to be done on a demo account. Altermatively the P&T Indicator paints symbols on the chart which could be used as triggers instead of the Alerts. Maybe two indicators are required.
- Triggering off of alerts tested in demo accouunt.
- Triggered off of chart symbols tested in Strategy tester.
My preference is for Alert triggering because it would have a broader application.
Your Developers Indicator will have:
a) Previous Data Buffer
b) Last Data Buffer
c) Previous Trend Variable
d) Last Trend Variable
e) Change Variable
When your Developers Indicator starts:
(a) & (b) will be loaded with the Last completed candle (candle[1]) data. (date & time; high; low; open; close; ask; bid)
(c) (d)& (e) will be set to zero.
When your Developers Indicator detects an Alert from Peak & Trough it will:
f) move Last Data buffer to Previous Data buffer i.e. (b) to (a)
g) move Last Trend Variable to Previous Trend Variable i.e. (d) to (c)
h) load Last completed candle (candle[1]) into (b)
then complete this logic.
I) IF Close(a) > Close(b) then (d) = 1
j) IF Close(a) < Close(b) then (d) = -1
k) IF (c) not = (d) then (e) = 1 else (e) = 0
two candles later (e) = 0
Would like to be able to define parameters so that I could use other candle data e.g. High or Low in the logic expressions above. OR I could simply edit and re-compile the supplied mq5. Good comments required in code.
Advice from the owner of ESB:
So you just ask the developer to expose the signals buffers. He will understand what you mean. He doesn't need to know anything about ESB. Tell him you want to use the indicator's output in another expert. It's simple for developers to do that. If still he don't understand, tell him you need to import this indicator into another expert using iCustom. That's it.
I have read the rules and understand that using the internals of Peak & Trough Indicator is not acceptable. The EX5 file of the Peak & Trough Indicator is available for Free download however the MQ5 is not available. By using the Alerts from the Peak & Trough Indicator to trigger the gathering of the candle data at that time the resulting variables will be usable as part of the decisions in ESB. No chart graphics required.
The concept here should be usable with any ex5 indicator that has an alert function.
This is my first freelance request so I am unfamiliar with the expected procedures. Please bear with me.
As a minimum requirement I need your Developers Indicator to provide the signal buffers described above by the ESB Owner. Ideally I would like the MQ5 file also so I can tweak things later.
Thanks