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

Simplest Basket Manager Ever
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5451
Page 1 of 1
Author:  SteveHopwood [ Sun Apr 29, 2018 3:58 pm ]
Post subject:  Simplest Basket Manager Ever

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:
Author:  minaz [ Mon Apr 30, 2018 8:11 pm ]
Post subject:  Simplest Basket Manager Ever

thanks steve :good:
Author:  lorenz22177 [ Mon Mar 09, 2020 1:07 pm ]
Post subject:  Simplest Basket Manager Ever

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
Author:  SteveHopwood [ Mon Mar 09, 2020 8:45 pm ]
Post subject:  Simplest Basket Manager Ever

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:
Author:  lorenz22177 [ Tue Mar 10, 2020 11:03 am ]
Post subject:  Simplest Basket Manager Ever

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:
All times are UTC Page 1 of 1