Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 376

 
alexey1979621:

Artmedi,

There you go again, attacking my hands. I've already written that I'm just learning. Since I have no systematic knowledge, I write as best I can. I think that such an experienced person like you could show me a master class on the example of my owl (I'm more interested in your style of EA writing). It's not too difficult, I think, it will take you 5-10 minutes to write it. How to suggest....
I have told you the algorithm. You are not listening. And to do something here for you "underhandedly" - nope, not going to happen.
 
artmedia70:
I told you the algorithm. You're not listening. And doing something here for you "underhandedly" - nope, not going to happen.

You don't have to do anything for me, you wrote verbatim, "Yeah, well... ...in your situation, when it's all so crookedly done, you can't just make normal suggestions..." . I understand that what I write is not brilliant, but everyone writes its own way (and the main indicator is not the beauty of writing, but the program works or not - I have it works, but only on one pair, as long as the terminal has not open other transactions - and the fuck with it anyway I will finish the program and it will work as I need). That's why I asked you to show me how to write correctly (from your point of view) what I already have (what I have in the open code).
 
alexey1979621:
You don't have to do anything for me, you wrote verbatim "Well yes... in your situation, when everything is so crookedly done - surely normal offers don't roll..." . I understand that what I write is not brilliant, but everyone writes its own way (and the main indicator is not the beauty of writing, but whether the program works or not - I have it works, but only on one pair, as long as the terminal has not open other trades - and fuck it, anyway I will finish the program and it will work as I need). That's why I asked you to show me how to write correctly (from your point of view) what I already have (what I have in the open code).


Do you need to open one position on each given pair? I gave you the answer.

You check if there is a position on a particular pair and, if there isn't one on that particular pair, you open it.

When you do a loop on positions, filter by magician and the desired symbol. What is the problem?

 
alexey1979621:
No need to do anything for me, you wrote verbatim "Well yes... in your situation, when everything is so crookedly done - surely normal sentences don't roll..." . I understand that what I write is not brilliant, but everyone writes its own way (and the main indicator is not the beauty of writing, but the program works or not - I have it works, but only on one pair, as long as the terminal has not open other transactions - and the fuck with it anyway I will finish the program and it will work as I need). That's why I asked you to show me how to write correctly (from your point of view) what I already have (what I have in the open code).


Damn, you've been told that you need to put the filters in the first brute force, so they would be the same as in the second brute force. Just because you're trying to trick someone for free, it doesn't make you look any better.
 
alexey1979621:
No need to do anything for me, you wrote verbatim "Well yes... in your situation, when everything is so crookedly done - surely normal sentences don't roll..." . I understand that what I write is not brilliant, but everyone writes its own way (and the main indicator is not the beauty of writing, but the program works or not - I have it works, but only on one pair, as long as the terminal has not open other transactions - and the fuck with it anyway I will finish the program and it will work as I need). That's why I asked you to show me how to write correctly (from your point of view) what I already have (what I have in the open code).


There is a ready solution

if(NumberOfPositions("EURAUD")==0)
    {
      // открываемся
    }
if(NumberOfPositions("AUDUSD")==0)
    {
      // открываемся
    }
The function itself
 
artmedia70:
This nickname is three hundred years old... I've grown fond of it.


in the '70s, I got a job in art media... ? o_o
 
r772ra:


There is a ready-made solution

The function itself

Thank you. Clear, straightforward, understandable. Already working.
 
artmedia70:

Do you need to open one position on each given pair? I gave you the answer.

You check if there is a position on a particular pair and if there isn't one on this particular pair, you open it.

When you cycle through the positions, you filter by magic and the right symbol. What is the problem?

I apologise for the insistence, but I really want to get to the bottom of it. Should it look like this for a buy trade on two pairs? If so, only one trade opens. But most likely I just don't get it.

 if(AUBuy==0)
 {
   for(i=OrdersTotal()-1; i>=0; i--)
   {
      if (OrderSelect(i,SELECT_BY_POS))
      {
         if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic) continue;
         AUBuy = OrderSend(symAU,OP_BUY,lotAU,askAU,3,0,0,"KVAZ",Magic,0,Blue); 
      }  
   }
  }
if(EABuy==0)
 {
   for(i=OrdersTotal()-1; i>=0; i--)
   {
      if (OrderSelect(i,SELECT_BY_POS))
      {
         if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=Magic) continue;
         EABuy = OrderSend(symEA,OP_BUY,lotEA,askEA,3,0,0,"KVAZ",Magic,0,Blue);
      }  
   }
  }
 
zoritch:

in the seventies you got a job in art-media... ? o_o

Are we also on a software forum? :-))

Artem witnessed the wedding of Peter the Great and Catherine Alexeyevna, Suvorov's victories, the war with the French, the Decembrist uprising and many other interesting events of the time.

 
zoritch:

in the seventies, got a job in art media... ? o_o
It's simpler than that, Jen. I just used to feed my family by making 3D clips for television. I already had the internet, and I needed a nickname. So its first component was a symbiosis of art and the first three letters of the name, and the media - you guessed right. When I registered the domain it turned out to be occupied by someone else somewhere. Who - I didn'tknow who. I had to put in the year of birth, too. So this nickname from the moment of transition from DOS-based 3D Studio4 to Windows-based 3D Studio MAX is stuck to me, like a "number on my foot" :))
Reason: