Equity TP and SL EA

MPTM's new home
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Equity TP and SL EA

Post by milanese »

Hi,

this is a little helper I coded. I will close all open positions on your account when a user defined TakeProfit or StopLoss Equity is reached. After the closure the EA adds/substracts a user defiened value to the EquitySL and EquityTP value. Too if you wish the EA can disbale all EA's in the account after closing all positions.

The inputs are:
EquityForTP_Close set here you wished Equity TP value
EquityForSL_Close set here you wished Equity SL value
AfterCloseAdd add/substraction value after close
checkSeconds set here how often you want the EA to check if a Closure would be needed (Sl or TP hit)
disableExpertsAfterClose if this is true the EA diables after the basket close all EapertAdvisers on your Empty4
useLastGlobalTpSlValues if this is true the EA uses the latest after a closure calculated values and not the values in your settings
EquitySLTP_E_EA.mq4
Hope it will be for some of you usefull!
Variant of the EA with EquityTrailing function:
This EA does use a function for setting a EquityBreakeven and moves the EquityStoppLoss, after the EquityBreakeven is set,in user selected steps.
This version will after a Basketclose always disable autotrading.
The inputs for this version are:
EquityForTP_Close set here you wished Equity TP value
EquityForSL_Close set here you wished Equity SL value
EquityForSettingBE trigger for setting BE, BE will be EquityForSettingBE-MinDistanzCashSLinWinToEquity;
MinDistanzCashSLinWinToEquity set here your MinDistance the new EquitySL should have.
At Exp, actual Equity is 12500 , MinDistanzCashSLinWinToEquity is set to 100, so your new EquitySL in win is 12400.
JS_CashAddCash added to the next JumpingStepPoint Equity, Exp.: last EquitySLMOve was with 12500 Equtiy ,JS_CashAdd is set to 50, so next MovingSL we be with an Equity of 12550 with the above exp the Equity SL will be moved to 12450..
Equity_EA_A.mq4
Cheers :)

Tommaso
You do not have the required permissions to view the files attached to this post.
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Equity TP and SL EA

Post by milanese »

:arrrg: :arrrg: as so often first upload had a copy paste glitch sorry, please all redownload...

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
Kimmy
Trader
Posts: 32
Joined: Thu Nov 17, 2011 10:57 am

Equity TP and SL EA

Post by Kimmy »

Milanese you are my HERO !!!!.......this is exactly what i have been looking for

THANK YOU..............THANK YOU..........THANK YOU ............this is AMAZING !!!!

Mille mille grazie ....................(penso che sei Italiano ?) :yahoo:
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Equity TP and SL EA

Post by milanese »

Kimmy » Mon Jan 26, 2015 8:18 pm wrote:Milanese you are my HERO !!!!.......this is exactly what i have been looking for

THANK YOU..............THANK YOU..........THANK YOU ............this is AMAZING !!!!

Mille mille grazie ....................(penso che sei Italiano ?) :yahoo:
di nulla... :xm:
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[New Variant]Equity TP and SL EA w BasketTrailing

Post by milanese »

Variant of the EA with EquityTrailing function:
This EA does use a function for setting a EquityBreakeven and moves the EquityStoppLoss, after the EquityBreakeven is set,in user selected steps.
This version will after a Basketclose always disable autotrading.
The inputs for this version are:
EquityForTP_Close set here you wished Equity TP value
EquityForSL_Close set here you wished Equity SL value
EquityForSettingBE trigger for setting BE, BE will be EquityForSettingBE-MinDistanzCashSLinWinToEquity;
MinDistanzCashSLinWinToEquity set here your MinDistance the new EquitySL should have.
At Exp, actual Equity is 12500 , MinDistanzCashSLinWinToEquity is set to 100, so your new EquitySL in win is 12400.
JS_CashAddCash added to the next JumpingStepPoint Equity, Exp.: last EquitySLMOve was with 12500 Equtiy ,JS_CashAdd is set to 50, so next MovingSL we be with an Equity of 12550 with the above exp the Equity SL will be moved to 12450..

Note I uploaded too an update for the first version in the first post
Both EA's are attached on the first post

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
mobthehop
Trader
Posts: 362
Joined: Wed Nov 16, 2011 12:16 am

Equity TP and SL EA

Post by mobthehop »

Hi T,

would you please consider to release a version that is based on percentages rather than absolute values?

Thanks in advance
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Equity TP and SL EA

Post by milanese »

mobthehop » Thu Jan 29, 2015 12:43 am wrote:Hi T,

would you please consider to release a version that is based on percentages rather than absolute values?

Thanks in advance
I will consider it, btw the allPairTrademanagerPlus ---> http://www.stevehopwoodforex.com/phpBB3 ... =21&t=3482 has this option inside the basket management, the only thing it does not do so far is disabling autotrading after basketclose..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[%version]Equity TP and SL EA

Post by milanese »

mobthehop » Thu Jan 29, 2015 12:43 am wrote:Hi T,

would you please consider to release a version that is based on percentages rather than absolute values?

Thanks in advance
here you go.. attached the version based on percentages..
see here updated fixed version.. --> http://www.stevehopwoodforex.com/phpBB3 ... 34#p113134
Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

updated Equity Basket Trail EA

Post by milanese »

I did update the second variant in the first post, too you find in previous post if interested, a version that uses percentages and not absolute values..
Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
mobthehop
Trader
Posts: 362
Joined: Wed Nov 16, 2011 12:16 am

Equity TP and SL EA

Post by mobthehop »

Thanks a lot T!
Locked

Return to “Utilities Indicators and Scripts”