[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 158
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
e.g. so for bystop:
Is it possible to put a condition on this line on Close for an indicator to close orders on, let's say, the
MA>Bid
where should it be inserted if possible, if so is what's below correct? ....
How do I find the maximum/minimum of the previous day?
What's wrong here?
//+------------------------------------------------------------------+
//| RSI+MA.mq4 |
//| Evgenio |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Evgenio"
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_minimum 20
#property indicator_maximum 80
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 MediumOrchid
//---- input parameters
extern int per_rsi=6;
extern int per_ma=24;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
int start()
{
int d;
int counted_bars=IndicatorCounted();
//----
for (d=0; d==Bars-counted_bars-1; d++)
{
double ExtMapBuffer1[d]=iRSI(Symbol(),PERIOD_H1,per_rsi,PRICE_CLOSE,0);
}
for (d=0; d==Bars-counted_bars-1; d++)
{
double ExtMapBuffer2[d]=iMAOnArray(ExtMapBuffer1,0,per_ma,0,MODE_EMA,0);
}
//----
return(0);
}
//+------------------------------------------------------------------+
here is the compiler log not like indexes and brackets why ?
'd' - integer number expected C:\Program Files\MetaTrader - Alpari\experts\indicators\RSI+MA.mq4 (42, 25)
']' - comma or semicolon expected C:\Program Files\MetaTrader - Alpari\experts\indicators\RSI+MA.mq4 (42, 26)
'd' - integer number expected C:\Program Files\MetaTrader - Alpari\experts\indicators\RSI+MA.mq4 (46, 25)
']' - comma or semicolon expected C:\Program Files\MetaTrader - Alpari\experts\indicators\RSI+MA.mq4 (46, 26)
Already found the error thanks for your attention
Is it possible to put a condition on this line on Close for an order to be closed by, let's say, a
where should it be inserted if possible, if so is it correct what's below? ....
--
--
>> : : : : : : : : : : : . >>Thank you for your help)
--
1) How do you make it switchable, through external variables?
2) Can I set it so that the first open order would be closed, and the next orders 2, 3 etc. would not be closed? Suppose I open a Buy order - this is the first order, then I open one more Buy order - the second one, etc. and then out of this series of orders only the 1st order would be closed by СorderClose?
Hello, everyone ))))
Help.
mql4 is just starting to program.
Writing an Expert Advisor.
i have a question: How do i do this?
I would like my EA to work on Mondays only. i would like it to open only 1 order on monday if i close it then it shuts down until monday.
I have a new bar open at 9.00 on Monday.
How do I determine the opening price and store it in a variable?