Bob and Jem and Shelley's Pivot Basket auto-trader

Share your 10.x automated traders here.
Post Reply
phil_trade

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by phil_trade »

garyfritz wrote:"invalid double number" !?

GlobalVariableSet is supposed to take a double. It will accept an int, and in fact the example in the online help uses Bars, which is an int.

But a runtime error of an "invalid" double? That sounds like a non-allowed value, such as NaN (Not a Number). But that seems pretty unlikely...
if found a post from ShelleyJEM EA with same error message
Getting this error on SJ 1h.

2012.06.12 08:38:52 ShelleyJem GBPJPYm,Daily: invalid double number as parameter 2 for GlobalVariableSet function
I found a way to have this message... set an integer negative number to GVset !
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by SteveHopwood »

garyfritz wrote:
SteveHopwood wrote:I am not aware of GlobalVariableSet needing a double rather than an integer; indeed, I successfully send integer values to a GV all the time. I have made the change though - no particular reason not to.
The function definition specifies a double value; however MQL should automatically convert ints to doubles when you call it. But it's always a good idea to use the right type and not rely on the language to fix it up for you -- especially with a flaky language like MQL.
Cheers Gary.

:D
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. pianodoodler@hotmail.com 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
alex_forex
Trader
Posts: 438
Joined: Tue Nov 15, 2011 5:46 pm
Location: F R A N C E

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by alex_forex »

EA working pretty well on my demo VPS :)

Just a suggestion for the mail alert :
If 3 trades are sent by the EA running on a GBPJPY chart, we receive 3 mails
with GBPJPY Buy trade or Sell trade instead of "Traded pair" Buy or Sell
:geek:


Kind regards :D
Alex
garyfritz

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by garyfritz »

I'm a little unclear on exactly how to run this beastie. Do you look once a day, set the PairsToTrade input to the promising pairs for the day (because they have slope > 0.6 and they're currently in pullbacks), and turn it loose to run that basket? Or do you set PairsToTrade to all pairs you'd be willing to trade, and then the EA looks for any opportunities at any time?

I thought it was the former (manually set it up for baskets) because of the MinimumPercentOfBasket input. I thought that meant "I listed 10 pairs in PairsToTrade, and MinimumPercentOfBasket is 50, so it won't fire until at least 5 pairs trigger. Then it will launch the whole basket." But after running for over 18 hours, it just entered 2 positions (AUDUSD & NZDUSD) a few minutes ago, so apparently it's a set-and-forget?

I had 10 pairs in my PairsToTrade, and MinimumPercentOfBasket is 50, so I'm not sure why it opened 2 positions...
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by spyderman »

garyfritz wrote:I'm a little unclear on exactly how to run this beastie. Do you look once a day, set the PairsToTrade input to the promising pairs for the day (because they have slope > 0.6 and they're currently in pullbacks), and turn it loose to run that basket? Or do you set PairsToTrade to all pairs you'd be willing to trade, and then the EA looks for any opportunities at any time?

I thought it was the former (manually set it up for baskets) because of the MinimumPercentOfBasket input. I thought that meant "I listed 10 pairs in PairsToTrade, and MinimumPercentOfBasket is 50, so it won't fire until at least 5 pairs trigger. Then it will launch the whole basket." But after running for over 18 hours, it just entered 2 positions (AUDUSD & NZDUSD) a few minutes ago, so apparently it's a set-and-forget?

I had 10 pairs in my PairsToTrade, and MinimumPercentOfBasket is 50, so I'm not sure why it opened 2 positions...
Gary
I think you put all pairs in the ea It lists pairs that meet slope criteria on screen
Then when your selected percent of trades trigger it will launch the basket
Snaggin' some pips
User avatar
getting
Trader
Posts: 26
Joined: Tue May 01, 2012 3:27 pm
Location: Thailand

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by getting »

garyfritz wrote:I'm not sure why it opened 2 positions...
give version 1e(49.73 KiB) a try, with EndlessLoop=false & AllowAdditionsToBasket=false
Image
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by SteveHopwood »

garyfritz wrote:Or do you set PairsToTrade to all pairs you'd be willing to trade, and then the EA looks for any opportunities at any time?
Yes.

I thought it was the former (manually set it up for baskets) because of the MinimumPercentOfBasket input. I thought that meant "I listed 10 pairs in PairsToTrade, and MinimumPercentOfBasket is 50, so it won't fire until at least 5 pairs trigger. Then it will launch the whole basket." But after running for over 18 hours, it just entered 2 positions (AUDUSD & NZDUSD) a few minutes ago, so apparently it's a set-and-forget?
I had 10 pairs in my PairsToTrade, and MinimumPercentOfBasket is 50, so I'm not sure why it opened 2 positions...
Posts like yours from someone like you always send me to look at post 1, in the hope that I can say something along the lines of, "Aye aye, yet another yahoo incapable of reading post 1."

Sadly, yet again it is mea culpa. Hey ho. There is always that, um, recent incident I am trying hard not to mention here................ :lol:

I have amended post 1. This should answer your query Gary. Sing out if not:

"- AllowAdditionsToBasket: this allows bjs to add fresh trades to the basket as they are triggered by a retrace beyond, then cross back over the daily pivot. The effect of this is to override MinimumPercentOfBasket and allow bjs to build baskets trade-by-trade rather than as all-in-at-once."

:D
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. pianodoodler@hotmail.com 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
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by SteveHopwood »

alex_forex wrote:EA working pretty well on my demo VPS :)

Just a suggestion for the mail alert :
If 3 trades are sent by the EA running on a GBPJPY chart, we receive 3 mails
with GBPJPY Buy trade or Sell trade instead of "Traded pair" Buy or Sell
:geek:


Kind regards :D
Alex
Thanks Alex. This is because I did not adapt the generic code I copied for the function, so it sends Symbol() rather than symbol, which is a variable that holds the pair actually being traded. I will fix this in the next update.

:D
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. pianodoodler@hotmail.com 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
alex_forex
Trader
Posts: 438
Joined: Tue Nov 15, 2011 5:46 pm
Location: F R A N C E

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by alex_forex »

Thanks Steve ;-)
I like so much receive good news in my mailbox :lol:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Jem and Shelley's Pivot Basket auto-trader

Post by SteveHopwood »

Version 1f is in post 1. Possibly.

Be warned gals and galesses, this one comes with a Severe Steve Is Sloshed Warning.

It is Chris's (wifey's) birthday today, so we have been imbibing. Quite a lot.

So, anyone with a remaining sober brain cell is best off checking my code before unleashing it onto some poor, unsuspecting demo.
  • 1) fixed the Alert thingy that Alex brought up.
    2) added code to set up a Global Variable that tells bjs that the silly sod should be sleeping if some other equally silly sod is daft enough to awake him during a post successful basket closure snooze.
Given my current state, it will be not a lot short of a miracle if 2 actually works.

Hic.

:D
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. pianodoodler@hotmail.com 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.
Post Reply

Return to “10.x EA forum”