Simplest Basket Manager Ever

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

Simplest Basket Manager Ever

Post by SteveHopwood »

Here is the scenario:
  • Slopey Peaky Bob running on a live account on my VPS.
  • I am monitoring the position on my desktop machine.
  • The position was in deep DD and I wanted to delete the outstanding stop orders.
  • Every time I deleted them from my desktop, SPB added them back.
  • I went to the VPS and told SPB to cut down on the number of stop orders to send.
  • He took no notice and just kept on adding them back in as I deleted them.
In the end, I removed him from the chart and deleted all the outstanding stop orders, but still wanted the basket to close should it ever reach its $30 target. I added an old version of MPTM with basket closure enabled.

VPS users know that it helps to reduce the cpu load, so I coded the attached basket manager. All it does is monitor open trades and closes them when my cash profit target is reached. The inputs are:
  • EventTimerSeconds: tells the manager how often to run its routines. The default is once a second.
  • MagicNumber: this tells the manager which trades he is to monitor. Bear this in mind:
    • A magic of 0 tells him to regard manual trades as 'his'.
    • A magic of -1 tells him to regard all trades on the platform as 'his', regardless of their origin and magic number. Use with care.
  • CashProfitTarget: your profit target in your account currency. The default is $30.
It may not actually be the simplest basket manager ever, but I bet it could see off most challengers. :lol:

:xm: :rocket:
You do not have the required permissions to view the files attached to this post.
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.
minaz
Posts: 9
Joined: Sat Jul 09, 2016 4:32 pm

Simplest Basket Manager Ever

Post by minaz »

thanks steve :good:
lorenz22177
Posts: 4
Joined: Thu Jun 01, 2017 6:27 am

Simplest Basket Manager Ever

Post by lorenz22177 »

Hello coders, actually I am using your "Simplest Basket Manager Ever" and it works great.
But can I ask if possible a modification?
I have 5 different Magic Id running on chart so to close each one using your EA i must open 5 chart and placing on each chart the EA with specific Magic .

Is it possible to change the code placing in the string "Magic Number", all the magic involved in the same profit desired but separated with a ","? ex magic: 1,2,4,5 Profit 10. not cumulative but each one

The Idea is that the EA focuses on 1 2 or more magic numbers, but focuses on them separately.

Many thanks id advance.

best regards.

Lorenzo
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.

Simplest Basket Manager Ever

Post by SteveHopwood »

lorenz22177 » Mon Mar 09, 2020 1:07 pm wrote:Hello coders, actually I am using your "Simplest Basket Manager Ever" and it works great.
But can I ask if possible a modification?
I have 5 different Magic Id running on chart so to close each one using your EA i must open 5 chart and placing on each chart the EA with specific Magic .

Is it possible to change the code placing in the string "Magic Number", all the magic involved in the same profit desired but separated with a ","? ex magic: 1,2,4,5 Profit 10. not cumulative but each one

The Idea is that the EA focuses on 1 2 or more magic numbers, but focuses on them separately.

Many thanks id advance.

best regards.

Lorenzo
Not entirely sure of the meaning of Simplest Basket Manager Ever, are you?

:xm: :rocket:
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.
lorenz22177
Posts: 4
Joined: Thu Jun 01, 2017 6:27 am

Simplest Basket Manager Ever

Post by lorenz22177 »

SteveHopwood » Mon Mar 09, 2020 8:45 pm wrote: Not entirely sure of the meaning of Simplest Basket Manager Ever, are you?

:xm: :rocket:

Sorry for my "funny" question....maybe asking and specifying "is anyone interested to make this job PAYING" could have produced a more interesting answer....

:clap:
Post Reply

Return to “Super Slope EA's”