Forex Zone - Forex Forum

Take Profit with defined lot size - script - not EA

Discussion started on New EA Coding

  • Newbie
  • Posts: 15
  • Points: 1470
  • Likes Received: 1
  • Reputation: +0/-0
Hello Traders!

I was wondering - is there a script that will work similar to MT4's TP but instead closing entire position will close only a part ?
For example at X price - close 0.04 lots out of 0.10 = 0.06 still open.
At the moment I'm using EA call OneClick Trader which has this option built-in but I don't want use this type of EAs any longer...
 





Linkback: https://www.forex.zone/new-ea-coding/26/-take-profit-with-defined-lot-size-script-not-ea/3262/
#1 - March 05, 2021, 02:12:58 PM

Administrator
  • Hero Member
  • Posts: 5086
  • Points: 29283
  • Likes Received: 5109
  • Reputation: +220/-14
I do not have a script like this, but I'm sure one exists somewhere.

Why do you want script and not an EA for this?
#2 - March 05, 2021, 02:29:19 PM

 Take Profit with defined lot size - script - not EA in New EA Coding_topic=585

  • Newbie
  • Posts: 15
  • Points: 1470
  • Likes Received: 1
  • Reputation: +0/-0
I do not have a script like this, but I'm sure one exists somewhere.

Why do you want script and not an EA for this?
I was trying to find one but no luck...

Well... I use  the Symbol changer profit display indicator.
It is really great idicator and I did not find better solution for a quick switching between open trades.
I also tried many EAs and unfortunately all of them are loading why to slow or sometimes freeze while switching.
Scripts are much faster and reliable. So that's why...

Maybe at least there is an EA that will do the job but won't require to open a new position via that EA ?
What I mean by that is - I open a new position via MT4 but proper TP is set and manageable via recommended EA.
Do you know any ?
#3 - March 05, 2021, 04:14:17 PM
« Last Edit: March 05, 2021, 04:15:55 PM by JFR147 »

Administrator
  • Hero Member
  • Posts: 5086
  • Points: 29283
  • Likes Received: 5109
  • Reputation: +220/-14
Scripts are much faster and reliable. So that's why...
It depends how they are coded though. If an EA is bogged down with features that are unneeded then it will be slower. Or even if it is coded poorly too. Scripts are meant for one-time tasks. After they perform the task, they are supposed to de-initialize and be removed from the chart automatically. Unlike EAs which are meant to run continuously. A script can be made to be stuck in a cycle to mimic how an EA works, but I would not recommend it. Especially considering what you said about switching time frames like you do. Every time you switch a TF, it would remove the script.

I do not think the nature of scripts are faster or more reliable simply because they are scripts. It's most likely your opinion because of using EA's that are 1 of the 2 reasons I mentioned above. If you had an EA coded specifically to do what you say and nothing else, you would see it would work just as fine as a script or even better.



Maybe at least there is an EA that will do the job but won't require to open a new position via that EA ?
What I mean by that is - I open a new position via MT4 but proper TP is set and manageable via recommended EA.
Do you know any ?
I do not know any myself, but I know something like this exists somewhere. It would be faster to code something than to spend time looking for it I think.



You posted another topic similar to this before here: 
https://www.forex.zone/ea-modifications/17/close-position-with-define-lot-script/3259

There are similarities between both requests. Either could be coded. If you had the choice, which one would you want done?


#4 - March 05, 2021, 04:49:11 PM

  • Newbie
  • Posts: 15
  • Points: 1470
  • Likes Received: 1
  • Reputation: +0/-0

I do not think the nature of scripts are faster or more reliable simply because they are scripts. It's most likely your opinion because of using EA's that are 1 of the 2 reasons I mentioned above. If you had an EA coded specifically to do what you say and nothing else, you would see it would work just as fine as a script or even better.

I do not know any myself, but I know something like this exists somewhere. It would be faster to code something than to spend time looking for it I think.



You posted another topic similar to this before here:
https://www.forex.zone/ea-modifications/17/close-position-with-define-lot-script/3259

There are similarities between both requests. Either could be coded. If you had the choice, which one would you want done?

Thank you for your wisdom and guidance.
I agree. Less complitade EA = faster loading.
Unfortunately my coding experience is almost zero.
However, someone modify for me the indicator from the post that you mentioned and it works like a charm :) (attached) but it is a immediate execution.
So if you believe that script is not a good idea in this case and I had choice - I would love to have EA coded specifically to do what I requested in this tread.
Maybe thx to the indicator that I've attached will be easier for someone to make necessary modifications.
#5 - March 05, 2021, 05:20:09 PM
Attachments:

Administrator
  • Hero Member
  • Posts: 5086
  • Points: 29283
  • Likes Received: 5109
  • Reputation: +220/-14
Maybe thx to the indicator that I've attached will be easier for someone to make necessary modifications.
You attached a script and not an indicator. Also, there will be no benefit in modifying it I think. It is a very simple script and it would not save time either way.

So you want an EA to run continuously on the chart and as soon as a TP is reached it will close out X lots. Will this occur for every order on that chart or for certain orders though? For example, do you want a user input for a a specific order # so that only the order # input will be affected?
#6 - March 05, 2021, 08:59:10 PM

  • Newbie
  • Posts: 15
  • Points: 1470
  • Likes Received: 1
  • Reputation: +0/-0
So you want an EA to run continuously on the chart and as soon as a TP is reached it will close out X lots. Will this occur for every order on that chart or for certain orders though? For example, do you want a user input for a a specific order # so that only the order # input will be affected?





yes, I would like to have a user input for a specific order.




Also, It would be nice to have some marker on the chart as a reminder, showing that TP is set at X price and what part of the position will close (example attached).

Not even mention about multi level option - X1 price TP1 = 0.04 closure, X2 price TP2 = 0.03 closure on the same order. I believe option of 4 levels would do.
Of course if it's not much hassle.




Thank you.







#7 - March 05, 2021, 10:39:18 PM
Attachments:
« Last Edit: March 06, 2021, 10:59:57 AM by JFR147 »

Members:

0 Members and 1 Guest are viewing this topic.