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 valueEquityForSL_Close set here you wished Equity SL valueAfterCloseAdd add/substraction value after closecheckSeconds 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 Empty4useLastGlobalTpSlValues if this is true the EA uses the latest after a closure calculated values and not the values in your settingsHope 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 valueEquityForSL_Close set here you wished Equity SL valueEquityForSettingBE 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..
Cheers Tommaso