You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Price close is the closed price of a bar is it not? So what I am trying to get the code to do here is to output an arrow above a bar which has closed above the price of where the R1Buffer was generated using the pivot point calculations. What keeps occurring here now is that once the closed bar closes above R1 an arrow is still not displayed and I can't seem to figure out why.
Anyways since then I've opted to use the following method:
Which means the variable array MakeArrow[i] is assigned the value of Open[i], meaning that when the Open[i] opens above R1 an arrow should be outputted. This is a syntax that would be accepted in usual C++/C# but MQL4 is not performing the function as I would expect.
Try this . . .
Here is where I tried to make the ammendment
Okay that makes sense now that I've checked it 'Price_close' is a constant and a such the value won't chance to correlate with any change in price in the current market. Open[] on the other hand I believe should be able to make a relation between the current open price or most recent price and the value in the data buffer for R1Buffer, meaning the If-Statement should be accepted and an arrow should be presented but this isn't the case. Could you please a look at my sourcecode and try and execute the indicator to suggest what might be the reason for this. I would really appreciate it.
Could you send me the full source code for the one you just implemented as it appears yours seems to be working, not sure why mine is not showing the same results. Thanks
I already told you why . . .
Your modified code is outside of the for loop . . . so it is only executed when the loop has finished.
I have just done as you said and it now appears to be working, thanks for the tips and help man, much appreciated.