stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Equity TP and SL EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4072
Page 1 of 2
Author:  milanese [ Sat Jan 24, 2015 11:24 am ]
Post subject:  Equity TP and SL EA

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
Author:  milanese [ Sat Jan 24, 2015 11:45 am ]
Post subject:  Equity TP and SL EA

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

Cheers :)

Tommaso
Author:  Kimmy [ Mon Jan 26, 2015 8:18 pm ]
Post subject:  Equity TP and SL EA

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:
Author:  milanese [ Mon Jan 26, 2015 8:23 pm ]
Post subject:  Equity TP and SL EA

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:
Author:  milanese [ Wed Jan 28, 2015 3:26 pm ]
Post subject:  [New Variant]Equity TP and SL EA w BasketTrailing

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
Author:  mobthehop [ Thu Jan 29, 2015 12:43 am ]
Post subject:  Equity TP and SL EA

Hi T,

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

Thanks in advance
Author:  milanese [ Thu Jan 29, 2015 12:45 am ]
Post subject:  Equity TP and SL EA

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
Author:  milanese [ Thu Jan 29, 2015 9:22 am ]
Post subject:  [%version]Equity TP and SL EA

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
Author:  milanese [ Thu Jan 29, 2015 9:38 am ]
Post subject:  updated Equity Basket Trail EA

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
Author:  mobthehop [ Thu Jan 29, 2015 12:46 pm ]
Post subject:  Equity TP and SL EA

Thanks a lot T!
All times are UTC Page 1 of 2