![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When code is decompiled the decompiler recreates the source code in such a way that an experienced programmer can immediately recognise it as decompiled code. The rules of this forum pretty much amount to this: Decompiled code is considered stolen. As it is very difficult to prove it is not stolen the rule of thumb is, avoid altercations with the moderators by only posting questions about original source code.
You didn't understand my point 100% and I guess that's the reason why your answer doesn't help.
I didn't challenged the rules of the forum or the moderator's decision. Most issues are raised by members, not moderators.
Don't get me wrong but the rule " you're guilty because I say so and it is very difficult to prove me wrong " doesn't really make any sense, does it?
"If you deliberately obscured the variables yourself there would be little point in posting it, who is going to spend their time trying to unravel your deliberately obscured code to help you with it ?"
All I said was that if I was trying to protect my EA from others I wouldn't use " d_Spread " or any other meaningful names .
If I had a protection worth EA, would I post on the forum for help? Probably not.
Your answer would have been more interesting if you'd truly answer the original question about how one can tell if the code is or isn't stolen.
(I would ask the moderator to please post a link where we could read more about the rule that says that all decompiled code is stolen, or what are the criteria based upon which we can determine if the code is in fact stolen.)
Your answer doesn't help at all : " an experienced programmer can immediately recognize ...". Should we have the code inspected by an experienced programmer before posting ?
Or maybe if one isn't an experienced programmer, shouldn't post anything?
Or maybe we should let the moderators decide and get off of that high horse of ours every now and then and have a closer look at the real world around us.
Hello,
Curious if anyone knows how to do this.
I mean, when my sell or buy order closed at 8:17pm with a loss, I dont want to place an order until 8:59pm or something like that.
I'd appreciate if anyone knows code for this.
My regards.
Here is an idea to stop an EA placing orders if last one was a loss for that hour.
First you need to loop trough history and find the last closed trade, the one with the highest closing time.
Here's how I see it :
Then, once the loop sets all the right values, do the check for symbol and profit.
If profit < 0, set the datetime prevTime to the time when order was closed + amount of minutes from the time of closing to the end of the hour:
Remember, this loops and checks have to be done before the routine that opens new orders !!!
Then insert condition before Order send :
The count of EA's orders is made by this loop. ( you may have to rename MagicNumber to whatever name you use for it).
So if there are no trades placed by this EA and the no trading time has passed, place a new trade.
You may define the variables as static local or just global scope. For example :
Hope it helps.
And if you have any questions, ask away.
Enjoy.
You need to check for symbol and magic number in the loop although I would think it easier to get OrderTicket() and re-select it.
Don't get me wrong but the rule " you're guilty because I say so and it is very difficult to prove me wrong " doesn't really make any sense, does it?
Your answer would have been more interesting if you'd truly answer the original question about how one can tell if the code is or isn't stolen.
(I would ask the moderator to please post a link where we could read more about the rule that says that all decompiled code is stolen, or what are the criteria based upon which we can determine if the code is in fact stolen.)
Your answer doesn't help at all : " an experienced programmer can immediately recognize ...". Should we have the code inspected by an experienced programmer before posting ?
Or maybe if one isn't an experienced programmer, shouldn't post anything?
Or maybe we should let the moderators decide and get off of that high horse of ours every now and then and have a closer look at the real world around us.
1) It makes a lot more sense. If you break the rule you are guilty by the fact. If you post decompiled code your guilty of posting decompiled code.
2) Of course there is no way to tell if code is definately stolen just by looking at it. But if it is decompiled it is likely it is. No one decompiles their own code and then posts it on a forum because they dont understand it. They do that to other peoples compiled code.
3) No you dont need to get code inspected before you post it. Just go ahead and post it. If a moderator believes the code contravines a forum rule they will remove it from your post and warn you. If by some slim chance that were to happen, then so what ? Is it going to ruin your entire day or something ? It's not like the FBI is going to show up at your house with a swat team. I think your making issue out of nothing.
4) The real world around us is like this, all the time people are breaking copyrighted code protection, decompiling it and distributing it on the internet. How would you feel if you put 6 months into developing software as a business venture and then someone decompiled it and bit torrent it and posting it on forums, your 6 months work given away willy nilly all over the world. If you would not like it yourself then you should understand why others try to make it socially unacceptable.
I used to think the moderators on this forum were being a little over zealous about banning decompiled code, but when I thought it through I realised they are doing it for the right reasons.
1) It makes a lot more sense. If you break the rule you are guilty by the fact. If you post decompiled code your guilty of posting decompiled code.
Not even close to answering the question " how can one tell if the code is decompiled or stolen?"
2) Of course there is no way to tell if code is definately stolen just by looking at it. But if it is decompiled it is likely it is. No one decompiles their own code and then posts it on a forum because they dont understand it. They do that to other peoples compiled code.
The question was how a person with less than expert qualifications can tell if the code is decompiled or stolen ? Your answer was blah, blah, blah.... there is no way to tell but .........it likely is. How's that supposed to help ?
3) No you don't need to get code inspected before you post it. Just go ahead and post it. If a moderator believes the code contravines a forum rule they will remove it from your post and warn you. If by some slim chance that were to happen, then so what ? Is it going to ruin your entire day or something ? It's not like the FBI is going to show up at your house with a swat team. I think your making issue out of nothing.
Buddy, I'm not making an issue, I'm asking a question and if you don't have the answer, it's OK. Glad to hear we agree on at least one thing and that is : It's the moderator's job NOT members to decide if a code is or isn't stolen !
4) The real world around us is like this, all the time people are breaking copyrighted code protection, decompiling it and distributing it on the internet. How would you feel if you put 6 months into developing software as a business venture and then someone decompiled it and bit torrent it and posting it on forums, your 6 months work given away willy nilly all over the world. If you would not like it yourself then you should understand why others try to make it socially unacceptable.
I used to think the moderators on this forum were being a little over zealous about banning decompiled code, but when I thought it through I realised they are doing it for the right reasons.
So your answer is : you can't tell for sure if the code is stolen or not, if you're not experienced you can't even tell if it's decompiled or not, so so don't buy, don't download and don't post it unless you 're sure it isn't decompiled or stolen, right? Are you serious?
If you put six months of work in an EA that's worth actually something and you can't protect it, maybe your work isn't ready for sell yet.
And from my point of view, Not all code is decompiled and Not all decompiled code is stolen so it is unlikely that the code one has it's stolen.
Let's calm down and don't make it look like " if you didn't buy it from me, it's likely to be stolen " kinda thing.
I bet there's a lot of guys that still wait for a real answer to " How can you tell if the code is decompiled or stolen ?" and will find a good answer quite useful .
I answered the question you asked me which was how to tell if code is stolen:
thrdel 2014.03.09 04:44
if you'd truly answer the original question about how one can tell if the code is or isn't stolen.
I gave you the answer to that and more, so now you lie and say your question was how to tell if it is "decompiled" or stolen. Obviously your a troll trying to be argumentative I'm not wasting any more time on you.
I answered the question you asked me which was how to tell if code is stolen:
I gave you the answer to that and more, so now you lie and say your question was how to tell if it is "decompiled" or stolen. Obviously your a troll trying to be argumentative I'm not wasting any more time on you.
Calling me a liar and a troll tactic doesn't really work since you were faking answering a question NOT addressed to you just to get some attention and to call yourself "experienced programmer".So the troll in this case would be you !
On the other hand you couldn't give us a straight answer for how to spot a stolen code and neither for how to spot a decompiled code, which basically means you don't know. Why did you jumped to post answers you don't know ?
Maybe you should " start changing with the man in the mirror ". Look at you before you look at others ! Stop interfering and posting if you don't have an answer is always an option.
Have a good day.
thanks for code have trouble putting code into.
I need to have a closer look at your code to understand what you wanted to do first, you know, logic first, code after.
There are sections that don't make sense, like this one :
then the entry looks like this :
At this point Direction=0 since you have just above it int Direction=0;
if(your condition || total==0) will place an order even if your condition isn't true because of " ||total==0 " and it's the same for sell and buy. You end up with 2 orders at the same time. Is this what you want?
After the sell order, regardless if successful or not, Direction=2;
Then condition for Buy order is Direction!=11 ! It will never be 11, you just set it to 2 a couple of lines before .
Maybe it will help if you could explain the logic behind it, how you intended it to work.
Cheers.
thanks very much for help already
inspecting it.