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

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

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

Post by Armen »

Hi Phil, mine is 0.9839
AUDCHF is in BUY mode BJSPB
harry45
Trader
Posts: 158
Joined: Fri Nov 18, 2011 11:36 am
Location: Russia,St.Petersburg

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

Post by harry45 »

phil_trade wrote:Hi Steve

as I experience freeze reading indicator with BJSPB, I cut the loop in start() for debug purpose only and adapt snoozed() to run visual test.

First, I found an error with GlobalVariableSet which need Double parameter but JslCash was Integer.

Second, I wonder if this loop in start() with "static datetime OldM1BarTime" define thousand time is not the problem some of us encountered, depending on windows version, memory amount and so on.

So I modify code and add the last time read indicator in display module so I can trace it. As BJSPB is not a scalp EA, may be we can avoid this loop and let chart tick call Start(). Using a high frequency tick pair as EURUSD could do the job.

I have mark this code version with //PHIL before each modification, so you can retreive them.

For those who experience this freeze read indicator problem, you can run this test version and trace the last Time reas indicator just under the version Number.

Hope this will help !

Philippe
Working fine,open 2 trades -EA-sell,ACHF-buy Daily Pivot0.98376(Cowboy Go Markets-NL).
Thank You
KingOfCoolville
Trader
Posts: 36
Joined: Sun Dec 04, 2011 4:52 pm

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

Post by KingOfCoolville »

Phil_Trade, just loaded your version of the EA up on my Alpari demo account. It is refreshing every minute.

When I load Steve's version on exactly the same system/account it loads initially but does not refresh.

The issues that Phil_Trade has highlighted seem to be the answer to the problem for the users that seem to have problems with the original EA not refreshing.
Armen

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

Post by Armen »

I am running Cowboy IBFX Empty4 built 419 on HP mini - the BJS v1B refreshes.
I have 10.2 indis (not 10.2A) on my charts.
Armen

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

Post by Armen »

I see A/F and E/A stall at previous H1 fractal. Closed all trades manually for some +56 pips.
Will wait for EUR zone Minimum Bid Rate and US ADP Non-Farm Employment Change figures.
phil_trade

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

Post by phil_trade »

Armen wrote:I am running Cowboy IBFX Empty4 built 419 on HP mini - the BJS v1B refreshes.
I have 10.2 indis (not 10.2A) on my charts.
mmm, I'm running Empty4 build 432...may be we have to check this

please, every one who experience this freeze problem, check and post your Empty4 version
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 »

phil_trade wrote:Hi Steve

as I experience freeze reading indicator with BJSPB, I cut the loop in start() for debug purpose only and adapt snoozed() to run visual test.

First, I found an error with GlobalVariableSet which need Double parameter but JslCash was Integer.

Second, I wonder if this loop in start() with "static datetime OldM1BarTime" define thousand time is not the problem some of us encountered, depending on windows version, memory amount and so on.

So I modify code and add the last time read indicator in display module so I can trace it. As BJSPB is not a scalp EA, may be we can avoid this loop and let chart tick call Start(). Using a high frequency tick pair as EURUSD could do the job.

I have mark this code version with //PHIL before each modification, so you can retreive them.

For those who experience this freeze read indicator problem, you can run this test version and trace the last Time reas indicator just under the version Number.

Hope this will help !

Philippe
Cheers Philippe.

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.

Version 1c is in post 1. I copy this from the edit to the post as an explanation:
- EndlessLoop: 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. To achieve this, bjs goes into an endless loop that checks the position twice a second. It turns out that this causes an EA freeze on some machines, so EndlessLoop allows you to cancel this feature. If your EA does not read the table once a minute, then set EndlessLoop to false.

This reminded me to do something about those non-stop alerts that someone mentioned at the start of the week, so I have added code that I think stops this, but am not sure that this does not kill the Alert thingy stone dead. See how it goes, but I might need to rethink this; it is far more complicated that non-coders might imagine.

: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.
phil_trade

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

Post by phil_trade »

SteveHopwood wrote:
phil_trade wrote:Hi Steve

as I experience freeze reading indicator with BJSPB, I cut the loop in start() for debug purpose only and adapt snoozed() to run visual test.

First, I found an error with GlobalVariableSet which need Double parameter but JslCash was Integer.

Second, I wonder if this loop in start() with "static datetime OldM1BarTime" define thousand time is not the problem some of us encountered, depending on windows version, memory amount and so on.

So I modify code and add the last time read indicator in display module so I can trace it. As BJSPB is not a scalp EA, may be we can avoid this loop and let chart tick call Start(). Using a high frequency tick pair as EURUSD could do the job.

I have mark this code version with //PHIL before each modification, so you can retreive them.

For those who experience this freeze read indicator problem, you can run this test version and trace the last Time reas indicator just under the version Number.

Hope this will help !

Philippe
Cheers Philippe.

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.

Version 1c is in post 1. I copy this from the edit to the post as an explanation:
- EndlessLoop: 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. To achieve this, bjs goes into an endless loop that checks the position twice a second. It turns out that this causes an EA freeze on some machines, so EndlessLoop allows you to cancel this feature. If your EA does not read the table once a minute, then set EndlessLoop to false.

This reminded me to do something about those non-stop alerts that someone mentioned at the start of the week, so I have added code that I think stops this, but am not sure that this does not kill the Alert thingy stone dead. See how it goes, but I might need to rethink this; it is far more complicated that non-coders might imagine.

:D
ooppss... no start() anymore if endlessloop = false !
if (!EndlessLoop) x = 2;//Turns off the loop for those whose ea freezes when using this

while(x == 0)//Start an endless loop
{
you need to move the line at the end of start()

Code: Select all

      Sleep(500);//Half a second
      
      if (!EndlessLoop) x = 2;//Turns off the loop for those whose ea freezes when using this
      
   }//while(x == 0)
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 »

phil_trade wrote:
ooppss... no start() anymore if endlessloop = false !
if (!EndlessLoop) x = 2;//Turns off the loop for those whose ea freezes when using this

while(x == 0)//Start an endless loop
{
you need to move the line at the end of start()

Code: Select all

      Sleep(500);//Half a second
      
      if (!EndlessLoop) x = 2;//Turns off the loop for those whose ea freezes when using this
      
   }//while(x == 0)
Good thing one of us has a firing brain-cell. :lol:

1d in post 1. I also remembered to move that static datetime declaration out of the loop.

: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.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

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

Post by spotdespot »

Steve - you know my MQL coding "skills" are limited so feel free to treat with disdain :lol:

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:

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)
Is in the endless loop.
Post Reply

Return to “10.x EA forum”