[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 218

 
How can I make it so that at the right time 1 order is opened instead of the whole pack?
 
oyshen писал(а) >>
How do I make 1 order at a time I need and not a whole bunch of them open?

Before opening, check to see if there are any already open... Alternatively, use the forum search and find a ready-made solution.

Or here, the most rudimentary option that will work with some caveats:

if (OrdersTotal()<1 && Ваше_Условие_открытия) OrderSend(.....)
 
MrSoros >> :

Write all values of Close[i]/Close[i+1] into array double num_array[N], and then use function ArrayMaximum/ArrayMinimum

double num_array[3]={Close[ k]/Close[ k+1] // и т.д};
             int    maxValueIdx=ArrayMaximum( num_array);

Error... Doesn't work!

If you don't mind, could you please show me an example. >> Thank you.

 
double num_array[3];
for (int i=0; i < 0; i++)
 {
  num_array[ i] = Close[ k+ i]/Close[ k+ i+1];
 }

int maxValueIdx;
maxValueIdx = ArrayMaximum( num_array);

like this

 

If I understand correctly what is required:

double num_array[10];
int    maxValueIdx;

for (int i =0; i < ArrayRange ( num_array,0); i++)  num_array[ i]=Close[ i+1]/Close[ i+2];

maxValueIdx=ArrayMaximum( num_array);

 
granit77 >> :

Carry out a linguistic analysis:

1. Shutdown>>Beyond operation>>Do not perform operations

2. from own code>>Without operator's intervention>>The shutdown condition is generated by Expert Advisor's code

The analysis shows that entering an additional logical variable, e.g., bool ON, solves the problem.

The code only executes trades when ON=true, for example: if(buy=1 && ON) OrderSend(.....).

The Expert Advisor decides to trade and assigns ON=true to the variable; Expert Advisor status: Enabled.

Expert decides not to trade and assigns variable ON=false; Expert Advisor status: Off.

Bolshyshchee spasubo.

 


How to integrate a function written in matlab into mt4 via dll
 
Figar0 Thank you very much
 

Just wondering, how do you draw a candle?

If you use ObjectCreate, object type is rectangle, then you have to specify 2 time coordinates.

Hence, the drawn candlestick will be located between (!) shadows of candlesticks in the chart, i.e. the rectangle will not cover the entire candlestick body.

You can't set fractional coordinates (1/2) of time...

 
alderru писал(а) >>

Just wondering, how do you draw a candle?

Check it out:

'CustomCandle'

might help...

Actually it's been discussed once, try searching again...

Reason: