simple allPairBasketManager

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

simple allPairBasketManager

Post by milanese »

Hi,

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 funtcion
reactivateExpertsAfterMinutes set here the minutes wishes for the reactivation
OOTB 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;
update version 1.16
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 equity
useJumpStepMovesTP=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 :clap: :clap: great adding!!!
simpleAllPairBasketManager122.mq4
simpleAllPairBasketManager122.ex4
Note: It is not allowed to publish this EA's outside of this SHF board!!
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
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

simple allPairBasketManager

Post by SteveHopwood »

Nice one Tommaso. :clap: Adding this to my wrup on Sunday night.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[bugfix]simple allPairBasketManager

Post by milanese »


feb. 4,2015

bugfix update resolves problems with setting the distance for setting BE that worked in the old version not as intended..
You find it 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
FxFoil
Trader
Posts: 42
Joined: Wed Dec 07, 2011 5:40 am

[bugfix]simple allPairBasketManager

Post by FxFoil »

.
Last edited by FxFoil on Mon Apr 30, 2018 9:26 pm, edited 1 time in total.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[update]simple allPairBasketManager

Post by milanese »

FxFoil » Wed Feb 04, 2015 12:37 pm wrote:
Thank You very much for this 'simple' manager.
I really like that it shuts off Autotrading after a close of basket . But could you consider adding an option to reactivate the AutoTrading xxx minutes after the close of basket. On the lower TF it is good to allow a few bars to pass before restarting trading, and I can't always do that manually.
Thanks again
Peter
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 funtcion
reactivateExpertsAfterMinutes set here the minutes wishes for the reactivation
OOTB 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.
You find new version as always attached on 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
FxFoil
Trader
Posts: 42
Joined: Wed Dec 07, 2011 5:40 am

[update]simple allPairBasketManager

Post by FxFoil »

.
Last edited by FxFoil on Mon Apr 30, 2018 9:26 pm, edited 1 time in total.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[fixed version]simple allPairBasketManager

Post by milanese »

No eggs on toast and a cup of coffee :xm: , but a fixed version..
fixed version 1.05
feb. 5, 2015

resolves a problem using wrong SL/TP /BE basic values with auto reactivate after a basket close
As always attached on 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
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

[fixed version]simple allPairBasketManager

Post by milanese »

milanese » Wed Feb 04, 2015 11:03 pm wrote:No eggs on toast and a cup of coffee :xm: , but a fixed version..
fixed version 1.05
feb. 5, 2015

resolves a problem using wrong SL/TP /BE basic values with auto reactivate after a basket close
As always attached on first post..
Cheers :)

Tommaso
sorry I did upload the wrong version :arrrg: :arrrg: , now it is the right one 1.05...
Please re-download all
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
jauhar
Trader
Posts: 24
Joined: Wed Apr 17, 2013 6:08 pm

simple allPairBasketManager

Post by jauhar »

I want to set a Basket TP only and no Basket SL. My account balance is 6100. When I set:
InitialBalancePercentForTP_Close = 2.5
InitialBalancePercentForSL_Close = 0.0

The EA info box displays:
Close All TP is: 6253
Close All SL is: 120

I don't understand the "Close All SL is: 120". Shouldn't it disable the basket SL when I enter 0.0 above?

Thanks for all your efforts.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

simple allPairBasketManager

Post by milanese »

jauhar » Thu Feb 05, 2015 5:16 pm wrote:I want to set a Basket TP only and no Basket SL. My account balance is 6100. When I set:
InitialBalancePercentForTP_Close = 2.5
InitialBalancePercentForSL_Close = 0.0

The EA info box displays:
Close All TP is: 6253
Close All SL is: 120

I don't understand the "Close All SL is: 120". Shouldn't it disable the basket SL when I enter 0.0 above?

Thanks for all your efforts.
this is so far not previsted I will later do an update doing this. But you can with the actual version enter a high percentage like 40% than your SL should only be hit in a real emergency case..

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
Post Reply

Return to “Utilities Indicators and Scripts”