as I had in the last days many requests for a simpleBasketTM, that does have BE and JS functions and can disable all EAs after basketclose, I coded this little TM.
The inputs should be selfexplaining, if you have questions please post them here as mostly others have same questions like you.
feb. 4,2015
new version, you can now let the EA, after a basket close with deactivating all EA's , reactivate EA trading after x minutes, the inputs for this are:
doUseReactivateExpertsAfterClose
set this to true for using the new funtcionreactivateExpertsAfterMinutes
set here the minutes wishes for the reactivationOOTB this feature is deactivated, the update contains some other fixes making THE EA more easy to handle...
Note the EA will with initializing automatic enable the ExpertAdvisors if
doAutomaticEnableEATrading
is set to true, this is OOTB set to false.update version 1.06
feb. 5, 2015
new input
doNotUseSL_Close
setting this to true the SAPTM will not use any Basekt-SL, not setting InitialBalancePercentForSL_Close= 0 has the same effect. If you will set InitialBalancePercentForTP_Close to 0 the SAPTM will use 1000% account balance as TP..
If you prefer the userInfos in the old fashion style set showDisplayBox=false..
update version 1.07
march 20, 2015
New input
NotDeletePendingOrdersOnBasketClose
(OOTB=false) set this to true if you do not want the pending orders to be deleted, with a basket-close, in the OOTB setting the SAPTM will close all open orders and delete all pending orders.bugfix version 1.09 apr. 1, 2015
Thanks to Zennor and SWG123 who had spotted that the SMAPTM not works as intended, if the BE function is disabled I could fix this as I never used the EA myself without this function..
Now this is fixed and the SAPTM should work too without using the BE settings as intendend!
update version 1.10
ap. 22, 2015
As it was requested to have a basket-close counter, and an user selectable input after how much basket-closes the simpleAllPairTM should deactivate EA trading. Here is the update presenting this function, if wished, you will find the new input:
disableAfterXBasketCloses
at exp. if you want to deactivate all EA trading after the second basketclose set this to 2 (OOTB it is set 0 so it will be ignored, EA trading will be deactivated after the first close) .Note this has only effect if you have set
disableExpertsAfterClose
to true.update version 1.11
may 2nd 2015 fixes problems with some setting and pending orders, that caused the EA to stop working correct in case of TP/SL hit, thanks to Mike & dydynamic for their signalisations, finally I found a bug.
Now here fixed.
update version 1.12
may 13th 2015
fixed some eventual reinitializing problems, if pending orders are not deleted with basket close..
update version 1.13
may 17th 2015
fixed a glitch in basketclose counter, sometimes giving wrong values..
too a rare problem fixed when not deletingPending orders with basketclose, that caused wrong basketcloses..
update version 1.14
may 19th 2015
Added new functions to deactivate and activate EA trading on a certain user defined time, this uses the broker time as input-time.
New inputs for this function are:
Code: Select all
extern string tim="---Activate/Deactivate on specific Time settings---";
extern bool useActivateOnXServertimeEATrading=false;
extern int ActivateEATradingHour=16;
extern int ActivateEATradingMinute=30;
extern bool useDeactivateOnXServertimeEATrading=false;
extern int DeactivateEATradingHour=14;
extern int DeactivateEATradingMinute=00;
may 24th 2015
As requested by many users added new
ActivateEATradingDay
and DeactivateEATradingDay
inputs for the EA-Trading Activate/Deactivate funtions on a certain user defined time.Too the userdisplay informs now about the Activate/Deactivate time if this optional is selected.
update version 1.19
june 7th 2015
As requested some new functions:
usePercentForMinDistanzCashSLinWinToEquity
setting this to true you can use percent values for the MinDistanzCashSLToEquity value (that is used when the EA moves the Basket-SL in win)usePercentForJS_CashAdd
setting this to true the value the EA adds to the BasketSL with every Jump-Step in win will be calculated as percent of the actual equityuseJumpStepMovesTP=true
this will if set to true, move the BasketTP value every jump step JS_TP_AddPercent
sets if you use this optional the percent of the actual equity used to add to the BasketTP with every jump-step. The idea is here to extend the possible run of a winning basket.update version 1.21
june 9th 2015
some update for making the EA more reactive and avoiding initialization process when there is no connection...
jul. 22th,2015
update version 1.22
Thanks to toc17 the SAPBTM gives now more useful informations, that can be used to find optimized settings. New the SAPBTM informs in the EA log after closing about the initial balance, why the basket was closed (sl/tp or jump sl hit), and how many times the SL was moved by the jumpSL function. In the user-display you will too find some more informations, Basket high- and low- watermark.
Thanks toc17 great adding!!! Note: It is not allowed to publish this EA's outside of this SHF board!!
Cheers
Tommaso