Problem with take profit function in EA...

 
Good morning,

I attach EA that operates on the breakdown of the levels of the MTF xSupertrend indicator

The code also provides the possibility of entering a fixed take profit, which has not worked for some time (perhaps because the code was written several years ago).

by entering any take profit value, the EA does not execute it, the order remains only with the stop loss

If anyone can help me....

Thanks in advance
Files:
 
Oscar Meani:
Good morning,

I attach EA that operates on the breakdown of the levels of the MTF xSupertrend indicator

The code also provides the possibility of entering a fixed take profit, which has not worked for some time (perhaps because the code was written several years ago).

by entering any take profit value, the EA does not execute it, the order remains only with the stop loss

If anyone can help me....

Thanks in advance

It looks like a hacked code. you best remove it and your post before the moderators ban you from the site.

 
The expert is mine, I had it developed by a programmer with the service of this site... absolutely no hacking
 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Oscar Meani #: The expert is mine, I had it developed by a programmer with the service of this site... absolutely no hacking

Then you should discuss the issue with your freelance coder.

The code you presented, is not setting any take-profit in the orders. It always sets it to zero which means, no take profit.

However, there does seem to some convoluted code trying to implement a virtual take-profit, but it's not working by the looks of it.

Overall, the code is very badly written.

 
Fernando Carreiro #:

Then you should discuss the issue with your freelance coder.

The code you presented, is not setting any take-profit in the orders. It always sets it to zero which means, no take profit.

However, there does seem to some convoluted code trying to implement a virtual take-profit, but it's not working by the looks of it.

Overall, the code is very badly written.

Thanks Fernando, then it doesn't matter, if you think you can also delete the request

thanks anyway