| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
hope this idea helps you ![]() |
|
|||
|
This would be extremely difficult to code if you're actually trying to set the stoploss values on the orders. If you can leave your EA running at all times, as I would think you do, then it's not too difficult.
Please see the attached code. I haven't had time to test it, so be sure to look at it prior to use. Settings: equity_lock How much you want to ensure you keep, once lock_start has been hit. equity_lock_start At what profit do we start locking in equity? equity_target At this amount of profit we close all orders Example: 100,130,500 - If we get to $130 profit, then we'll lock in $100. If we get to $500 profit, we close all orders. Realize that because this is a stand-alone EA, it's not very friendly. It ignores magic numbers and manual orders and will take everything into account.
__________________
//AirforceMook// |
|
|||
|
Quote:
Thank you |
|
|||
|
I give as a bonus with my differents offers a CloseAll with global $ amount. One of the features is a global trailing stop in $ amount. In other words, it works exactly like the standard MT4 trailing stop but this one is in $ and for a global profit (all order at the same time).
All targets are in $ and are hidden. Not sure that is what you need. FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!! Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM NEW: video presentation of the Probability Meter ... 24hrs action on the website |
|
||||
|
I did something like this. Keep track of all orders via $ amount. Assuming all your orders have the same magic number, first you have to figure your total profit by magic number. I created a function to do this:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| trail SL EA | jonas | Expert Advisors - Metatrader 4 | 2 | 09-22-2007 09:13 AM |
| Trailing EQUITY STOP FEATURE? | tyger01 | Metatrader 4 | 1 | 12-21-2006 03:25 PM |
| If the current day equity is more than the repvious equity | babarmughal | Expert Advisors - Metatrader 4 | 6 | 12-17-2006 11:48 PM |
| Account equity percentage stop loss...help! | faifarni | Expert Advisors - Metatrader 4 | 3 | 08-08-2006 05:36 AM |