simple question - page 3

 
meikel:

i have never been familiar with OOP [...]

If it's any consolation, MT5 doesn't seem to be too familiar with OOP either. For example, there doesn't seem to be any representation of trades etc using classes. Instead, you'd have to do something like the following:


if (HumanGetBoolean(HUMAN_HASMADEMISTAKE))
{
  HumanSetBoolean(HumanIndex, HUMAN_LEARNNEXTLESSON, true);
}
(It's a little hard to trust an OOP platform where the fundamental artifacts of the platform aren't represented as objects.)
 
cloudbreaker:

What's the intention with the line " if (Price < Price), Digits) " ??

Looks nuts to me.


CB

my bad...this was only a sample to tell that I had tried in a different manner so I didn't compile this time...however the exact code that I tried was:


if (CheckFirstOP(OP_BUY) > 1) {      
      for(int i = OrdersTotal() - 1; i >= 0; i--) {
          OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
          if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber || OrderType() != OP_BUY) continue;     
          double Price = OrderOpenPrice();
          if (Price < Price) {                               
             int Ticket = OrderTicket();           
             double Lot = OrderLots();                          
             OrderClose(Ticket, Lot, OrderClosePrice(), 3); 
         }    
      }   
   }
the intention is to select the order with the lower price...I don't know if this is the right way but I know now that it does not function...does not close the trade
 
Aljohin:

my bad...this was only a sample to tell that I had tried in a different manner so I didn't compile this time...however the exact code that I tried was:

if (Price < Price)

You're still left with a condition which CB is rightly flagging up as nonsensical. I think there's a reason for this:


gordon wrote >>

3. Your variable naming convention is... not so good.

The reason why the naming convention is... not good is almost certainly that the code has been run through a decompiler. That's the only thing which generates variables with names such as l_pos_44. I'm sorry, but I'm personally not prepared to help sort out code such as this, because it almost certainly involves a breach of copyright. (Hence, belatedly, the flippancy above. Can't be bothered to stick to the topic in a topic such as this.)


 
Aljohin:

my bad...this was only a sample to tell that I had tried in a different manner so I didn't compile this time...however the exact code that I tried was:


(Price < Price)

hey, this can NEVER bee true.

what do you think if someone wants to tell you, that

"an 80-inch-guy is smaller than an 80-inch-guy!" ?

absolutely nuts....

 
meikel:

not only thats.

how could this compile errorfree, with a missing left bracket.

i am tired of this code-grabbing-null-insight-full-idiots-and-full-wasicus-and-not-want-to-pay-a-cent-asking-for-help-guys


as the matter of fact I did buy the EA 80 USD and than contacted the owner and asked him to modify it for me offering him 300 USD...he refused...(maybe has something to do with the odd nomenclature)...than some other experts asked me 750 USD for the modifications...I think I cannot afford this kind of money (just to implement a code that closes an order)...

anyway I told from the begining that this is my first try to create/modify an EA,

it doesn't seem to me that you as an expert have found already where is the mistake...

and finally if you are not willing to help what are you doing here?...I think the null-insight is not only my characteristic

 
Aljohin:

as the matter of fact I did buy the EA 80 USD and than contacted the owner and asked him to modify it for me offering him 300 USD...[...]

I'm sorry, but - if I'm right about the decompilation - none of this gives you a legal right to decompile the code and then modify it. (Except possibly in the Russian Federation, which has an extremely odd, cold-war-relic copyright law.) If you're not happy with what you've got, ask for a refund of your $80.

 
jjc:

You're still left with a condition which CB is rightly flagging up as nonsensical. I think there's a reason for this:


The reason why the naming convention is... not good is almost certainly that the code has been run through a decompiler. That's the only thing which generates variables with names such as l_pos_44. I'm sorry, but I'm personally not prepared to help sort out code such as this, because it almost certainly involves a breach of copyright. (Hence, belatedly, the flippancy above. Can't be bothered to stick to the topic in a topic such as this.)


I'm not giving here the code of the EA this is only a simple order selecting and closing...there are hundrets of this if you just change the names...and it is already modified...in many parts...if I change the names will it be ok for you?

Ok forget the code...does anyone know how to select and close an order (as said above)...and how much it will cost eventually to me?

 
Aljohin:

as the matter of fact I did buy the EA 80 USD and than contacted the owner and asked him to modify it for me offering him 300 USD...he refused...(maybe has something to do with the odd nomenclature)...than some other experts asked me 750 USD for the modifications...I think I cannot afford this kind of money (just to implement a code that closes an order)...

anyway I told from the begining that this is my first try to create/modify an EA,

it doesn't seem to me that you as an expert have found already where is the mistake...

and finally if you are not willing to help what are you doing here?...I think the null-insight is not only my characteristic

it looks not that you have buyed it from the owner.

the owner who has coded that EA would have taken this 300 USD for modifying the EA in maximum time of an hour.

i guess you paid an hacker for nothing.

not familiar with the code, it needs more time to adjust it to your needs, this is more expensive than the original coder would charge.

i think between 50 and 150 USD is a acceptable price to modify the code to your needs for a coder who has to analyze the whole code before modifying it.

maybe a little more....

no, i search not for others mistakes, i have enough to do to remove my own mistakes, thats the task of a coder.

"willing to help" - what does that mean ? are only ghandi-coders allowed to write posts and dying-for-profit-newbies are allowed to open threads ?

 
Ais:

Please try to use this:


thankyou Ais I will try

 
meikel:

looks like a decompiler name convention ...

"he is new to this stuff"

Yeah, now that u mention it, it does look like it :)

Reason: