So I'm trying to turn an indicator I wrote into an EA. I coded the logic into the indicator so the buffers draw a line where my SLs should be, as
well as drawing arrows where my entries and exits are. How would i phrase it using iCustom so that it places my trades based on those buffers?
Would it just be:
if (iCustom(buy arrow buffer)
Also, how do i make it so that my SL is the value of the line drawn on the chart? Do I just make an array that holds the values of the lines drawn and then
in the OrderSend method say something like line?
Thanks in advance for any help
You need to consult the reference manual about iCustom. MQL4 or 5, it's a different usage.
To get the SL value you could set up an additional indicator buffer so your EA reads that out instead of looking at chart objects.
To get the SL value you could set up an additional indicator
buffer so your EA reads that out instead of looking at chart objects.
The SL line is a buffer, so it would work to just call that buffer using icustom? its MQL4 btw