Steve,
after a backet close, EA enter in sleeping mode. If, for any reason, Empty4 is closed and run again, EA doesn't remender it was sleeping and send another basket.
It will be great to store in GV this sleeping state and read it in init()
Bob and Jem and Shelley's Pivot Basket auto-trader
- 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
I suppose start() is the wrong place for this code anyway. I have left it in place, and copied it to LookForPositionClosure(), which is probably where it belongs. I have also changed the name of the Global Variable, so don't assume the problem has necessarily gone away yet. We shall see.spotdespot wrote:Steve - you know my MQL coding "skills" are limited so feel free to treat with disdain![]()
Anyway - there seems to be an issue with BJS when a successful basket is hit and the EA sleeps for whatever time specified (1 minute in my case) when endlessloop = false. What then happens is that BJS opens another basket (as it should if qualified) and then instantly closes it. I "suspect" that it is because the global variables are not being deleted so BJS thinks we have hit our profit target and closes the basket:
Is in the endless loop.Code: Select all
int OldOpenTrades = OpenTrades; CountOpenTrades(); if (OpenTrades == 0) { BreakevenAchieved = false; GlobalVariableDel(PipsTpGvName); GlobalVariableDel(CashTpGvName); CloseNeeded = false; JslPips = 0; JumpingStopPips = 0; }//if (OpenTrades == 0)
V 1e in poost 1.
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.
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.
- 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
Good idea. I will add this later.phil_trade wrote:Steve,
after a backet close, EA enter in sleeping mode. If, for any reason, Empty4 is closed and run again, EA doesn't remender it was sleeping and send another basket.
It will be great to store in GV this sleeping state and read it in init()
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.
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.
- spyderman
- Trader
- Posts: 338
- Joined: Sun Dec 11, 2011 1:39 pm
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
Just for informational purposes here's what I get when loaded on ILQ/BBFX and UPFX. Tried to switch all the settings to as liberal as possible.
Thanks,
Thanks,
You do not have the required permissions to view the files attached to this post.
Snaggin' some pips
-
feucht
- Trader
- Posts: 101
- Joined: Thu May 03, 2012 3:16 pm
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
2 great trades today, and a net haul of 135 pips. One small issue though, the basket is set to sleep for 90 minutes, and sits there awaiting the time, but once it passes nothing happens. I tried changing the timeframe on the chart it lives on, but it added the 90 minutes to the current time again. This is on 1d with EndlessLoop set to the default of True.
I have readded the EA, set EndlessLoop to False, and it is monitoring pairs again.
I have readded the EA, set EndlessLoop to False, and it is monitoring pairs again.
- Jemook
- Trader
- Posts: 1085
- Joined: Thu May 10, 2012 10:19 am
- Location: Bondi, Sydney, Australia
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
Yeehaa baby, not a bad EA 
This EA will work amazingly in trending markets. When price closes above and below the daily pivot repeatedly in a range then hopefully the losses we take on it won't be too large and the profits we take on nights like this make up for them. So far looking good.
This EA will work amazingly in trending markets. When price closes above and below the daily pivot repeatedly in a range then hopefully the losses we take on it won't be too large and the profits we take on nights like this make up for them. So far looking good.
You do not have the required permissions to view the files attached to this post.
Please note I am no longer affiliated with Global Prime. I've moved on to my next adventure with Afterprime.
Catch me here: https://www.afterprime.com
Catch me here: https://www.afterprime.com
-
garyfritz
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
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.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.
-
phil_trade
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
error message in log was "invalid double number as parameter 2 for GlobalVariableSet function"garyfritz wrote: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.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.
but I have not check if GV was filled with the good value...I suppose no.
-
phil_trade
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
SteveHopwood wrote
Just to inform :you will find the profit level of a large basket of trades changes rapidly, and it is desirable to have this calculated more often than by waiting for the next tick on the chart hosting bjs
I have check EURUSD at 19H30 GMT : from 2 ticks / seconds to 1 tick / 3 seconds.
-
garyfritz
Re: Bob and Jem and Shelley's Pivot Basket auto-trader
"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...
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...