[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 151

 
And all together, what would it look like
 

Does anybody know if there is a script that deletes pending orders with TP 0000 and SL 0000? The pending orders are placed by an EA, but apparently due to the proximity to the price these orders are placed without the TP and SL. I would like to delete them instantly as I once lost half of my profit.

Do you have such a handy thing?)

 
sss2019:

No, it's not like that, my friend and I were discussing)) the point was that the stop loss is moved to breakeven, and the trailing move follows the price. And it's all at the same time and at the same order! That's what I am asking if somebody can explain what I mean.


ask your not too smart friend not to set you up and make you look stupid.

There are commonly used concepts. if you and your friend are confused in the head, you better read the theory or at least listen to what you are told. and not make up problems for yourself.

 
Thank you Vinin.
 
double val=Low[iLowest(NULL,0,MODE_LOW,1000,0)];
int low_pos=iLowest(NULL, 0, MODE_LOW, 1000,0);
int time_low=Time[low_pos];
double va1=Low[low_pos];
string txx = TimeToStr(time_low,TIME_DATE );

double va2=High[iHighest(NULL,0,MODE_HIGH,1000,0)];
int High_pos=iHighest(NULL,0,MODE_HIGH,1000,0);
int time_High=Time[High_pos];
double va2=High[High_pos];

string txz = TimeToStr(time_High,TIME_DATE );

Vinin tell me why va2 prints that variable is already defined, but va1 works.

 
Thanks Vinin sorted it out.
 
torozik:
double val=Low[iLowest(NULL,0,MODE_LOW,1000,0)];
int low_pos=iLowest(NULL, 0, MODE_LOW, 1000,0);
int time_low=Time[low_pos];
double va1=Low[low_pos];
string txx = TimeToStr(time_low,TIME_DATE );

double va2=High[iHighest(NULL,0,MODE_HIGH,1000,0)];
int high_pos=iHighest(NULL,0,MODE_HIGH,1000,0);
int time_High=Time[High_pos];
double va2=High[High_pos];

string txz = TimeToStr(time_High,TIME_DATE );

Vinin tell me why va2 prints that variable is already defined, but va1 works.

I'm not a gynecologist, but I can look it up. You re-declared the type of variable, and it's not allowed :)
 
Filinni:

I already know if there is a script that deletes pending orders with TP 0000 and SL 0000. The pending orders are placed by EA, but because of the proximity to the price they are placed without TP and SL. I would like to delete them instantly as I once lost half of my profit.

Do you have such a handy thing?)



I think someone will do it on Job for five bucks.


If you can not find anyone - write, I'll do for free, but under some conditions, not less stupid than the application :)

 

Good afternoon)

Don't take this as a tirade, but

How do I compare two consecutive ticks? For example, is the next tick bigger than the previous one or smaller?)

Thanks in advance

 
pu6ka:
The timeframe in many technical indicators can be set by MQL regardless of which one you are on. Lookhere for the second parameter: int timeframe.
With MA it's all clear.

But I can't find how to get H1 bar values on another timeframe?

These are:
High - maximum price of each bar of the current chart;
Low - minimum price of each bar of the current chart;

That is High[1]...High[10] and Low[1]...Low[10], but from H1 timeframe, no matter what timeframe you are in.

Of course we can use M1, but maybe there is another way.

Reason: