First post here, but lurk alot.
Recently got into learning programming and mql4, so i apologise if this has been answered multiple times before...but i couldn't find anything
So i have a custom indicator that draws horizontal lines on my chart of x periods, and i'm trying to figure out how to get the values of the lines
on my chart.
I would share my code if i even knew where to start, but i've really come up against a brick wall and kinda looking for some basic hand holding
for the initial part.
i've included a photo to help visualise it, basically how do i say in mql4 a cross above the red = buy and a cross below blue = sell?
also included the indicator too
sorry probably should have been clearer, it does draw
lines, but as little dots (probably easier to see in photo)
after getting a little help i can now set to buy and sell at the right places using buffers...but now my problem is the indicator isn't updating the
high/low, so it just buys and sells at the same price as the last high/low but doesn't recalculate the high low when price does break said
i've been thinking maybe it would be better to calculate the high/lower period myself in the EA? However how can i "save" the price of a 20 period
high for example instead of just returning the highest bar of the last 20 bars?