
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
Just noticed now, that you are trying to read the second buffer but Trix only has one buffer.
You also seem to be using a different start position than the RSI. Its not an error but it does not make much sense. Also make sure you really have that much data available in terms of Bars available.
thank you Fernando for your help but I test with all kind of possibilities...
nothing change...
Is it not possible an EA work (make conditions, actions ect...) with the datas of 2 standards indicators?
for exemple "if rsi=... AND trix=... then do something..."
Is there an example?
thank you for the help
All possibilities except the correct one! I said, use buffer "0" not "1":
AN EA can use as many Indicator as it wants (within a very big limit). That is not the case. Your code is just not properly coded. So, please read the previous post and try again. One step at a time, please!
AN EA can use as many Indicator as it wants (within a very big limit). That is not the case. Your code is just not properly coded. So, please read the previous post and try again. One step at a time, please!
Thank you Fernando for all your support
I wrote my code after the code example of the tutorial "indicator for newbie"
on this tutorial there are two example,
That why I used CopyBufferAsSeries() and not CopyBuffer()
I used buffer 0 for TriX but I have always not the current TriX (for exemple -0.00001) but 0
you said me:
I don't understand how to check that there are enough data in terms of Bars available.
In facts, I don't need, at this moment, for this test EA, the past values of RSI and TriX but just the current values.
I just need that the EA know what is the current value of the Trix and RSI but I don't understand why the TriX remain at 0
That why I used CopyBufferAsSeries() and not CopyBuffer(). I used buffer 0 for TriX but I have always not the current TriX (for exemple -0.00001) but 0
I don't understand how to check that there are enough data in terms of Bars available. In facts, I don't need, at this moment, for this test EA, the past values of RSI and TriX but just the current values. I just need that the EA know what is the current value of the Trix and RSI but I don't understand why the TriX remain at 0
"CopyBuffer" copies many bars of indicator values, but if you only need the current bar or even the previous bar, you don't need to copy 100 bars as you are doing. You just need to copy 1 or 2 bars!
However, that has nothing to do with the buffer index that I asked you change. Both RSI and TriX only have one buffer, so you have to use index 0 for both!
The following code sample is copying only the current bar:
"CopyBuffer" copies many bars of indicator values, but if you only need the current bar or even the previous bar, you don't need to copy 100 bars as you are doing. You just need to copy 1 or 2 bars!
However, that has nothing to do with the buffer index that I asked you change. Both RSI and TriX only have one buffer, so you have to use index 0 for both!
The following code sample is copying only the current bar:
thank you Fernando
but even with your code I can't get the TriX value, only the RSI
I don't use the getindicatorbuffers.mqh with the copybuffer because it made wrong number of RSI, I desactivate it
here I want to get the RSI and the TriX, but I just get the RSI in the expert console, even with your code.
the problem is elsewhere but I do not know what is preventing the value of the TriX from being received
I didn't think it was so hard to receive the last value of the TriX
here is the code modified with your help and a screen capture of the EA in MT5 (see screen capture attached file)
I tell it I want the RSI 5 and TriX 5, and I run it in m1 eur/usd graph but I just get the rsi...
I am sorry for all my problems, but I can't do it
simply I try Vladimir's code but when I compile it I get some errors with that line
and the problem is not for me the RSI (or the previous value of RSI), but that I can't get the last TriX
here is my code after Vladimir's post
I thank you, you and Vladimir for your help but I will certainly give up
It's now some days that I try to get this TriX value and it's impossible...
and the problem is not for me the RSI (or the previous value of RSI), but that I can't get the last TriX here is my code after Vladimir's post
I thank you, you and Vladimir for your help but I will certainly give up It's now some days that I try to get this TriX value and it's impossible...
Here is my version of your code! Hope it helps! Please note my style of coding is different to yours!