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

 

Good afternoon.

Here is the problem:

I need to avoid repeating trades, i.e. on one bar only one deal could open.

I have created this code:

bool CheckOrders()
{
for(int i=0;i<OrdersTotal();i++)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
int p =iBarShift(NULL, 0,OrderOpenTime(),true);
Print (p);
if (p==1)return(false); else return(true);
}


But it doesn't work.

The log shows that the first value of p is 20.

2010.12.09 17:57:33 2010.06.28 15:47 robo1 GBPUSD,M5: 20
then 100, 359... etc.

why does it miss?

I don't understand why it happens...? Please advise...

 

Professionals, please advise me.

I have programmatically drawn a Fibo channel (ObjectCreate("Fibo1",OBJ_FIBOCHANNEL,.....), can I follow this channel further, only programmatically (e.g. every day I need to know if the price is out of the channel).

 
AlexSTAL:
Allow the DDE-server in the Metatrader settings and restart it

Can you tell me what to do to add more currency pairs?

And how (if possible) to display data on 5, 15 and 30 min. bars?????

 
igrok2008:

Please tell me what to do to add more currency pairs.

Copy the line in excel or adjust the existing formula

igrok2008:

And also how (if possible) to display data on 5, 15 and 30 min. bars?????

No way... It's streaming real-time quotes

 
AlexSTAL:

Copy the line in the excel or tweak the existing formula

No way... These are real time streaming quotes

I meant USDCAD or AUDUSD.

And how does metatrader display 5 15 30 etc time charts???????????????????

 
igrok2008:

I meant USDCAD or AUDUSD.

Where do you want it? To metatrader???? In the market overview "Symbols", if this DC does not have them, it is not possible to add

igrok2008:

And how do the metatrader display 5 15 30 etc timeframes???????????????????

What does this have to do with it? You somehow have no idea what you want and how you want....

For you, I guess you could say this: the DDE is designed with hyper-abridged functionality ONLY for streaming online quotes. It does not work with history

 
Aleksandr:

and these Owls that live in Files :) usually with the extension MQ4(EX4) - they nest in the Metatrader's folder \experts\.

Owls only like their own schedule - which they are fond of - and refuse to caw if you try to put another Owl in it... (which doesn't stop the other Owls from living in their nests)

when a tick comes - Owls swallow it and start digesting it - passing it through the digestive tract described in the strat(){....} section

Sometimes, Owls are cloned - one and the same copy is cloned to different charts - then they live each in its own stream, without disturbing its other copies (if, of course, they are carefully marked with Symbol() and MagicNumber...

====

in general, noubs don't give a shit about forex - go STUDY, FUCK YOU .....


Dear Professionals of this forum. I think that you, Aleksandr and you artmedia70 belong to them. Aleksandr, I won't answer you in your tone, you must be tired, you decided to relax. All that you have answered is well-known to me, it is described in Metatrader's Guide, and there is also a description of the language. I've stated it (maybe in different words) in the first half of my post.

Next. The first question (may be really bad), but it was for startup. But the second one, which you didn't answer, what's wrong with it? Because artmedia70 I think I understood, but culturally silent (or did not know, or was not 100% sure of the correctness of his answer (if given). But all tics, I'm asking you or poke me in that place where the sequence of EAs performed by Metatrader is described. Maybe I missed it somewhere, and if it's not described, then from your experience or a hunch (which will be worse, I'll have to test it somehow) answer me:

A cloned (neatly) Expert Advisor like "PSB" on two charts of the same pair. The first chart is М30 - clone "1С30". The second one is М15 - clone "2С15". Let the sequence written for the example correspond to the sequence of (visual) charts on the screen. When a tick comes, which Expert Advisor will "swallow it" first, and which one will "swallow it" second? And the chewing itself is not of interest now. You know - tell me. For Metatrader, EAs as simple operators, it can only execute them one by one EVERYWHERE? By chance? It doesn't. He, MT is a rigid algorithm. Guys I'm not writing this for you (and others are reading it), I think you already understood what I mean. After all, if we write not a simple EA, but one that at least considers MM, and then clones it in variants and puts it on one account and gets wrong results, people wonder why this is so? As for the correct connection of EAs and their testing, I haven't seen any questions on any forum. (Maybe I missed it?) I think maybe it's 2*2=4, not really, there are easier questions and they are answered calmly by professionals. And it was on your forum I decided to ask this question. I thought I'd get a better answer. Maybe it would help someone and clear my head. Still, I hope so.

 
medicine is powerless here :)
 
pension:


Dear Professionals of this forum. I think that you are Aleksandr and you are artmedia70 among them. Aleksandr, I won't answer you in your tone, you must be tired, you decided to relax. All you've told me is well known to me, it's described in Metatrader's Help and the description of the language is also there, in fact I stated it (maybe in different words) in the first half of my post.

Next. The first question (maybe really bad), but it was for starters. But the second one, which you didn't answer, is bad? Because artmedia70 seems to me to understand, but culturally silent (or did not know, or was not 100% sure of the correctness of his answer (if he would give). But all tics, I'm asking you or poke me in that place where the sequence of EAs in Metatrader is described. Maybe I missed it somewhere, and if it's not described, then from your experience or a hunch (which will be worse, I'll have to test it somehow) answer me:

A cloned (neatly) Expert Advisor like "PSB" on two charts of the same pair. The first chart is М30 - clone "1С30". The second one is М15 - clone "2С15". Let the sequence written for the example correspond to the sequence of (visual) charts on the screen. When a tick comes, which Expert Advisor will "swallow it" first, and which one will "swallow it" second? And the chewing itself is not of interest now. You know - tell me. For Metatrader, EAs as simple operators, it can only execute them one by one EVERYWHERE? By chance? It doesn't. He, MT is a rigid algorithm. Guys I'm not writing this for you (and others are reading it), I think you already understood what I mean. After all, if we write not a simple EA, but one that at least considers MM, and then clones it in variants and puts it on one account and gets wrong results, people wonder why this is so? As for the correct connection of EAs and their testing, I haven't seen any questions on any forum. (Maybe I missed it?) I think maybe it's 2*2=4, not really, there are easier questions and they are answered calmly by professionals. And it was on your forum I decided to ask this question. I thought I'd get a better answer. Maybe it would help someone and clear my head. But I hope so.

Everyone has a search button:

https://www.mql5.com/ru/articles/1412

 
artmedia70:

Everyone has a "Search" button:

https://www.mql5.com/ru/articles/1412


Most people do not need this button