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
Its this. For Long Position it works, but it does not work for Short Position. Please Help.
What do you mean by "it does not work"?
Be more specific.
Print out the error when there is one.
Read William's post #3 carefully and address all the issues that he has pointed out and then re-post your updated code.
What do you mean by "it does not work"?
Be more specific.
Print out the error when there is one.
Read William's post #3 carefully and address all the issues that he has pointed out and then re-post your updated code.
Its OrderModify Error 130.
I have read over those but i could not figure it out. Thus, I came here to ask for help
Your new topic has been deleted.
It is concerning the same code that you have here.
Do not open new topics with different problems concerning the same code. Keep it all in one place.
Your new topic has been deleted.
It is concerning the same code that you have here.
Do not open new topics with different problems concerning the same code. Keep it all in one place.
Yo, i want to delete this forum, but i do not know how.
i asked for your help yet you wont help. Not to mention, this forum is old that people wont read it anymore.
How then should i solve? hmm?
It took you less than 10 minutes to delete the new post
However, when i asked for your help not once but twice, you blatantly ignore and keep me stuck here, isnt this abit of power abuse?
It took you less than 10 minutes to delete the new post
However, when i asked for your help not once but twice, you blatantly ignore and keep me stuck here, isnt this abit of power abuse?
What are you talking about, "Power abuse"?
Nobody is obligated to help you.
I told you some posts back
What do you mean by "it does not work"?
Be more specific.
Print out the error when there is one.
Read William's post #3 carefully and address all the issues that he has pointed out and then re-post your updated code.
and you replied
Its OrderModify Error 130.
I have read over those but i could not figure it out. Thus, I came here to ask for help
Which is not specific.
You have not even attempted to modify your code using William's suggestions. You will find that if you are prepared to put in some effort others are more likely to help you.
What are you talking about, "Power abuse"?
Nobody is obligated to help you.
I told you some posts back
and you replied
Which is not specific.
You have not even attempted to modify your code using William's suggestions. You will find that if you are prepared to put in some effort others are more likely to help you.
1. Regarding William's Suggestion, I did read his comments and incorporated it, thus I was able to successfully adjust CloseOrder and ModifyOrders.
2. The new post I posted was about making OrderModify run only once, which is not the same as getting error code.
3. About Power Abuse, thinking back it was not really an abuse, but when you deleted my post, which was about different issue, i was pissed so I wrote something that I regret, so about that I apologize. However, I really do not think you deleting my post was 100% fair either as when you create a forum, as days past, it gets sent back in the forums, so the exposure decreases exponentially, no?
So I created a different post regarding different issue
But, you did not even read my new post, you just assumed it was under the same name and the code looked similar, thus you deleted the post immediately, would you call that fair? I understand it was under same name, but atleast you could've read what i wrote.
Also, since this forum was not getting any exposure, I kept asking you for help, but you wouldn't really help. So I am stuck with this forum which is not getting any exposure, while I am not able to open another post because you will simply delete my post. I kind of do not think that is fair, no? Did you honestly read my edited code and question I was asking for? If you really did and it was same issue, I apologize as I am still new. But, the issue i was asking for help as making OrderModify work only once, i.e. Once i hit my first TP, modify SL & TP only once and close order after that.
4. About nobody is obligated to help, i fully agree, that is why i was trying to get exposure by creating another post, regarding different issue.
5. Lastly about "specific", I thought Error 130 was specific enough as that was the only code I saw in the EA error, so this might be miscommunication in my part.
What you did was post basically the same code that you have posted here.
The code still had the poor coding practice that William has already pointed out to you here.
If I left that topic open, somebody else may waste their time pointing out those same mistakes. That will waste their time, the same as it has wasted Williams time as you have not addressed the issues even though they have been pointed out to you.
William stated
but you are still doing it.
He also said
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 2013.06.07
Did you even read the link?
This is probably one of the most important issues that you need to understand because if you don't you will make the same mistakes over and over again.
So this is the first issue that you should address.
What you did was post basically the same code that you have posted here.
The code still had the poor coding practice that William has already pointed out to you here.
If I left that topic open, somebody else may waste their time pointing out those same mistakes. That will waste their time, the same as it has wasted Williams time as you have not addressed the issues even though they have been pointed out to you.
William stated
but you are still doing it.
He also said
Did you even read the link?
This is probably one of the most important issues that you need to understand because if you don't you will make the same mistakes over and over again.
So this is the first issue that you should address.
Okay First, thank u for replying.
1. About OrderLots thing, I changed to normalizedouble, so that it will be able to always divide by 2, and yes i understand that it can not close or have remaining less than MinLot, but it was not an issue as starting lot was 2.
Also regarding this, that is why I only want to ModifyOrder only once, so that it will never reach the MinLot. These are reasons why I believe I fixed the issue and why I am asking for help to limit OrderModify to only once.
2. Regarding moving SL to break even +1, I believe I did as my current stoploss is stoploss +/- 1, and modifying order before closing was not necessary because it never was an issue as I looked all every backtest orders and SL has always been moved up.
3. Flags, I tried but I could not really understand so i skipped that first
4. Manual TP i thought and tried it but turns out the comission fee ate into all the profit. Nonetheless, these issues were fixed and issue I am currently talking about is limiting ModifyOrder to only once.
5. Bid == thing, yea I understand and in code I have both in form of <= and ==, and i did not really see it as an issue as in backtesting, it all closed, and if in forward testing, it still remains an issue, i will immediately change to <= or >=.
So I believe I followed his advice pretty much everything (aside from flag as I could not really fix it), so I do not think that I did not try.
If you do not believe, heres the code that i currently have. You will see that all these issues have been fixed and only issue left is that ModifyOrder function keeps looping everything the price reaches TP point.