Hi All,
Just a quick question. Im learning to code in MQ4 and i want to place arrows on a chart at the most current bar using a script. I found an indicator that places arrows down and thought id use some of that code in my script. Heres what i got, but i cant get it to work at all. Any assistance with this would be great.
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 SeaGreen
#property indicator_color2 Red
double CrossUp[];
double CrossDown[];
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY,3);
SetIndexArrow(0, 233);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY,3);
SetIndexArrow(1, 234);
SetIndexBuffer(1, CrossDown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
CrossUp[1] = Low[1] - 0.0001;
return(0);
}
Cheers
Chris
Just a quick question. Im learning to code in MQ4 and i want to place arrows on a chart at the most current bar using a script. I found an indicator that places arrows down and thought id use some of that code in my script. Heres what i got, but i cant get it to work at all. Any assistance with this would be great.
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 SeaGreen
#property indicator_color2 Red
double CrossUp[];
double CrossDown[];
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY,3);
SetIndexArrow(0, 233);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY,3);
SetIndexArrow(1, 234);
SetIndexBuffer(1, CrossDown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
CrossUp[1] = Low[1] - 0.0001;
return(0);
}
Cheers
Chris