The Indicator is using Graphical Chart objects and not buffers. So either your code needs to check the Charts Objects for the data (which I think will be very inefficient) or re-code the indicator logic within your EA itself for a more efficient solution.
if( sup > 0.0 ) if(mt4Period==PERIOD_H4 && (Bid-sup<=0.00900)){Print("SUPPORT H4========= "+sup);SendBuy=true;} else SendBuy=false; if( res > 0.0 ) if(mt4Period==PERIOD_H4 && (res-Ask<=0.00200)){Print("RESIST H4========= "+sup); SendSell=true;} else SendSell=false;
- Where are you getting the "sup" and "res" data from?
- All chart elements and objects as well as bars are all Bid prices, so the "res" is also most probably a Bid price too (and not to be used with the Ask). I say this because you don't specify how you are obtaining it.
- Where are you getting the "sup" and "res" data from?
- All chart elements and objects as well as bars are all Bid prices, so the "res" is also most probably a Bid price too (and not to be used with the Ask). I say this because you don't specify how you are obtaining it.
void displayPeriod( int mt4Period )
From this function in the indicator code in the first post
Yes, but that code is internal to the Indicator. You did say that you were coding an EA, not changing the original Indicator, right?
Do you mean to say that you copied the function over to the EA code and you are adapting it?
If so, post the entire section of the code adaptation, so we can see if you are adapting it correctly.
However, if you did not copy the function across and are just assuming that "sup" and "res" are just magically available to you from the indicator, then it is not going to work!
I'm trying to code an EA based on the support and resistance levels this indicator provides, but I can't figure out how to get the values. There are no buffers so I assume a little code needs to be added to this indi?
Any help will be greatly appreciated.
In your code what does "extern int LB = 3;" do?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm trying to code an EA based on the support and resistance levels this indicator provides, but I can't figure out how to get the values. There are no buffers so I assume a little code needs to be added to this indi?
Any help will be greatly appreciated.