Download MetaTrader 5

Excess Printing

To add comments, please log in or register
FourX
1304
FourX  

I only want this to print the Spread to the Experts Journal when it places an order when the spread is low enough. Now it prints one every time (their is a Tick?) and more annoyingly, makes a sound. I want to fix it, not just eliminate the sound (< 8)

Thanks for any and all assistance.

         if (d_Spread <= d_MaxSpread)
          OrderSend(Symbol(), OP_BUY, d_Lots, Ask, 2, l_price_64, l_price_72, s_TradeComment, i_ID, 0, Blue);
           {
            Print("The Spread on the ", s_Pair," Buy order is ", d_Spread);
            PlaySound("Alert.wav");
           }
Brian Dee - Random Trader
1760
Brian Dee - Random Trader  

Does that look like decompiled code to anyone else - or am I just getting paranoid?

-BB-

Ubzen
5390
Ubzen  
What was the verdict. Oh yea I remember "No self-respecting programmer would name a variable" l_price_72. I cannot remember who said that on this forum but still remember the line :)
whroeder1
15902
whroeder1  
  1. Yep, decompiled code, STOLEN from someone. No one should help you with it.
  2. I want to fix it, not just eliminate the sound (< 8)
    1. Define fix
    2. No slaves here, learn to code or pay someone.
FourX
1304
FourX  

It looks like it to me as well. In my defense I'm not the one who de-compiled it.

I also bought and paid for the commercial version before I found the source code for it. If I hadn't, I would of replaced the obscure variables with more common sense ones. Having paid for this I don't have a guilty conscious about it, but with 'appearances' being what they are, perhaps I should of.

I don't know who would code with things like l_price_72 either, but it's a real pain; especially for a NuB like me. But then quite likely that is the whole point.

Though after the fact I rather suspect the vendor that is selling this pirated it themselves )< 8( ' Thus you won't see me promoting it, marketing it, selling it or even giving anyone else the name of it so that they can buy it. Unless I can find the originator of it selling it themselves, which is highly unlikely. I hope this isn't pirated as I think that anyone that puts the significant time, effort, resources and money into being able to first of all learning to trade profitably consistently and then code a consistently profitable EA out of it on top of that SHOULD be paid for it. When it gets mass marketed it the prices are generally low enough and very reasonable as they get spread out over a large number of users. We all know that alas these profitable (commercial) EAs are the rare exception to the rule as most commercial EAs aren't worth the space that they take up on our HDDs. Which is why after avoiding learning MQL4 and trying to rely on others both from here and other forums, but that for the most part have EAs that I paid for and that mostly aren't consistently profitable, I have finally surrendered to the inevitable and thus here I am starting to fumble my way through MQL4. Hindsight. But you won't find me posting or distributing the source code myself as like yourselves I don't like it or agree with it.

However I was glad to find the source code for this EA that I PAID FOR as the commercial version that I bought would only Sell and not Buye )< 8(, Surprise, surprise: the so called 'tech support' hasn't (been able to?) fix it. I did manage to fix that part though, so who knows, it might turn out to be profitable yet? But I'm not holding my breath.

The MaxSpread is something that I added but the constant 'Alert.Wav' is driving me crazy! Though under the circumstances, one might tend to think that these are my 'just deserts' (weird saying that one). I don't know why printing the spread to the journal would trip it all the time as it doesn't do it without it. Only when it actually places an order as it is supposed to. I tried concatenating the Print statement after the OrderSend with a &&, but the compiler won't allow it. So obliviously this would still be a problem for me regardless of whose code I am putting it into.

So PLEASE can I get some help with this?

,,

I'm surprised and happy to still find some of you experienced and competent coders here and not all migrated totally and completely gone exclusively over to v5 now. I had heard that it is better: for the brokers; but NOT for us peons that for the most part donate our scarce sheckels to them and those that can and do profit on the ForEx, which alas isn't me as of yet. I did pay a substantial amount of my very scarce resources for extended private tutoring on a profitable manual system. But had further very serious health interventions before I could complete it. With my health restrictions, I couldn't trade it manually anyway; but if I had completed it and it wasn't such a long interlude between when I was able to get back to this and knew it well enough, I might of been able to code it into a profitable EA; or partner up with a coder that could. Given that, I'm glad that it looks like v4 will still be around for quite some time yet with the massive amount of it around and with v5 not being backwards compatible. Which is rather lame but seems inevitable at some point in the evolution of a programming language. Have to leave the inherent limitations behind at some point in time, and v4 certainly has it's share of these.

So what's the story and the consensus on v5? Though it is obviously inevitable, is the verdict 'in' on it yet? Do tell and 'Vote now!' (< 8)

whroeder1
15902
whroeder1  
FourX:

It looks like it to me as well. In my defense I'm not the one who de-compiled it.

However I was glad to find the source code for this EA that I PAID FOR as the commercial version that I bought
  1. If someone steals property and gives it to you, you are GUILTY of receiving stolen property. The fact that you didn't steal it yourself is IRRELEVANT. Someone STOLE the code. Did you get the code DIRECTLY from the seller? Don't think so.
  2. You DID NOT pay for the code. You paid for the use of the EA. Do you really think a commercial EA would give away the code to everyone. It would be no longer commercial. Gates has paid millions if not a billion to create windows 7. He sells the binary to everyone for $119. Do you really expect him to give the source code away for that price?
  3. Rationalize it all you want. YOU are an accomplice of a thief. No one should help you.
FourX
1304
FourX  
WHRoeder:
  1. If someone steals property and gives it to you, you are GUILTY of receiving stolen property. The fact that you didn't steal it yourself is IRRELEVANT. Someone STOLE the code. Did you get the code DIRECTLY from the seller? Don't think so.
  2. You DID NOT pay for the code. You paid for the use of the EA. Do you really think a commercial EA would give away the code to everyone. It would be no longer commercial.
  3. Rationalize it all you want. YOU are an accomplice of a thief. No one should help you.
FourX
1304
FourX  

FourX: Points taken. But I'm not going to jump off of the bridge for coming across the source code to a non functioning program that I paid for in good faith. I sincerely hope that it is the author that got my money. But considering that it won't even make short sell orders and tech support is unable to fix this it seems unlikely. Obviously I wasn't aware of any of these things when I paid for it.

Did you get the code DIRECTLY from the seller?

No I didn't, but after I bought this unfortunately it seemed that the seller didn't either or I WOULDN'T of BOUGHT IT. I won't pass it onto anyone else, nor where they can buy it. Not the name, and neither the source code nor the compiled EA. This includes you. Unless you have the conviction, will and resources to prosecute and convict them.

Hopefully you don't encounter and have to interact and deal with to many obliviously totally immoral reprehensible reprobates like me with absolutely no redeeming social value. I guess I can only aspire to be the quality of person that you are some day.

All the best to you WHR.

FourX
1304
FourX  

WHR:

As I paid for this EA in good faith and as in most cases it is being sold by it's developers, who is it that got ripped off here? Your a programmer: do the math. I have bought or paid for more such commercial EAs than I care to admit as almost all of them are not profitable in the least. So who is it that actually IS making money off of them and who is it that is getting ripped off? The people like me that bought and paid for them in good faith based on there statements of the products capacities or the developers and/or those that sell them. When you buy a product to do something based on the statements and claims about it and then it isn't able to to the job that you got it to do, who is it that got ripped off? You or the producer of the product with the false claims of its capacities?

In most democratic jurisdictions, it is NOT illegal to have the source code of any software. What IS illegal is distributing it it to others without the authors consent. Regardless of if it is given away for free or sold. I don't distribute any commercial software as per the agreements regardless of what form it is in. So before you go around making serious slanderous and libelous false accusations and moral judgments against others based on your ignorance of the law, at least find out and know what you are talking about.

whroeder1
15902
whroeder1  
What IS illegal is distributing it it to others without the authors consent.

And that is exactly what you did. The code was decompiled from an executable, not given or sold to you from the author. You got it from someone else who stole it. Wither he gave it to you or sold it to you is irrelevant. Rationalize it all you want. YOU are an accomplice of a thief. No one should help you.

And since you continue to try to debate this, I now put you in the category of a troll.

When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.

forexCoder
507
forexCoder  

Wtf. WHR stop throwing grenades at everybody who unwillingly gets scammed in fx and mql4. It's not the end of the world plus the author was trying to be honest, paid for the thing, and only later realised that he got cheated and wanted to get the best out of it. He also stated the obvious stuff in his long and winded post of which you took a sentence out of context and crucified the op as accomplice of a thief, which he isnt. And I'm quite sure you too try to get the best out of situations where you get cheated . Plus psychology dictates that people get angry at other people (among other stuff) for things that they themselves would do but were taught it was wrong by their authority figure(s) and conditioned accordingly. Your second post is thus completely unconstructive and serves no purpose beyond judging and repeating stuff you have already said.

EDIT: plus you're yourself a troll, for repeating posts and craving for attention. C'mon man you're worth more than that.


@ op: I won't help with decompiled code. I will help you learn MQl4 however.

1) You probably see clearly where you have playSound function and you clearly don't want it.

2) Spread for the current symbol can be found with MarketInfo() function.

3) The syntax for checking booleans is if(something1 < or > or = something2 ){ do something3). You have a nice example in your own bit of code.

4) Commenting code out is done by // for a single liner or /* code code code */ for multiple liner. You probably want to use it where there are pasrts of code you don't want, but still checking out if the code won't crash when you actually delete stuff.

5) general opinion: beyond some more advanced stuff the code is actually sound and you only need to make 1 comment, and one little varibale change (to a lower value) to achieve your goal.

Here this should help you enough to make some modifications. Hopefully you will also learn enough by doing it to not rely on decompiled code anymore and to not buy it anywhere on the web anymore :P If you ask here where you can find legit mql4 stuff, you'll get decent info. Even a coder or 2 will offer themselves cheaply for your services, I'm sure.

Market Info - MQL4 Reference
Market Info - MQL4 Reference
  • docs.mql4.com
Market Info - MQL4 Reference
123
To add comments, please log in or register