Hello fellow traders
I’ve been trading SPB Successfully in demos and since recently in a small live account
Still Using v1o from way back and since I’m not using any of the recent additions, I decided just to stick with it to avoid the risk of messing things up.
Today something strange started to happen (after a long time with the EA functioning 100% properly and as intended).
As of today’s market open, my demos in the two Brokers I use (Global Prime & Fort FS, in which I demo parallel “similar” setfiles), have stopped closing on Individual Basket Take Profit reached. The demos I have running on global basket closure have closed properly, but that’s not the case for the Individual basket take profit ones.
PLease see the screenshot below to see what I mean:
Some more information that might be useful:
- The EA is picking up the trades as per its Magic Number Properly (as can be seen by the populated tables)
- The EA is recognizing the Individual Basket Take Profit Target Correctly (noted in the text above)
- Although the TP target has been surpassed by a lot, no closure still. This is happening in all my demos (around 6-7 of them, with different take profit Amounts, but same situation in al lof them).
I repeat.. Up until today, I’ve been getting correct closures as intended.. this only started happening today.
I went to check on the Code and noticed the following error when trying to compile:
I have no clue wether or not this is having anything to do with the situation I’ve described, but I don’t recall seeing this warning in the past when I tried to compile.
Anyone else experiencing a similar situation?
I’d appreciate greatly if some of you coders out there could point me in the right direction to fix this problem
Thanks
EDIT: I've replicated the Setfiles in question in the latest version (v2s), and the same is happening...no closure!
fyi, I've taken down the TP to $7.00 just to "force" a closure (nothing happens)
Slopey Peaky Bob
-
acostafulano
- Trader
- Posts: 243
- Joined: Tue Dec 06, 2011 3:40 pm
Slopey Peaky Bob
You do not have the required permissions to view the files attached to this post.
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Slopey Peaky Bob
Hi.
There have been two Empty4 updates recently, the actual build is 1320, dated Dec-11-20. Empty4 updates sometimes have side-effects.
You should definitely replace the return(0) with a return(false). Then see whether the problem still exists.
Stay well and safe.
There have been two Empty4 updates recently, the actual build is 1320, dated Dec-11-20. Empty4 updates sometimes have side-effects.
You should definitely replace the return(0) with a return(false). Then see whether the problem still exists.
Stay well and safe.
Happy pippin, Thomas 
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
-
acostafulano
- Trader
- Posts: 243
- Joined: Tue Dec 06, 2011 3:40 pm
Slopey Peaky Bob
Thanks Tomele!
I have an update though...
Overnight, it seems ALL of the trades that should've closed, ACTUALLY closed accross all of my platforms, (actually for a very nice profit).
It's very strange though.
This strange experience aside, I have proceeded and changed return(0) with return(false)
I'll be reporting any issues.
Thank you THomas
I have an update though...
Overnight, it seems ALL of the trades that should've closed, ACTUALLY closed accross all of my platforms, (actually for a very nice profit).
It's very strange though.
This strange experience aside, I have proceeded and changed return(0) with return(false)
I'll be reporting any issues.
Thank you THomas
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Slopey Peaky Bob
This is a teensy coding error in the bool CloseOrder(int ticket) function that I have usually corrected as I go along. What you saw when you compiled the code was a warning that something was not quite correct, not a red flagged error that would have stopped compilation.acostafulano » Mon Dec 21, 2020 11:28 am wrote:
This strange experience aside, I have proceeded and changed return(0) with return(false)
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.
-
acostafulano
- Trader
- Posts: 243
- Joined: Tue Dec 06, 2011 3:40 pm
Slopey Peaky Bob
I understand
It's working properly now, despite that "warning".
I just thought it was worth pointing it out.
I'll report if I have any new developments. For now the EA keeps working fine
Thank you
It's working properly now, despite that "warning".
I just thought it was worth pointing it out.
I'll report if I have any new developments. For now the EA keeps working fine
Thank you
SteveHopwood » Mon Dec 21, 2020 10:43 am wrote:This is a teensy coding error in the bool CloseOrder(int ticket) function that I have usually corrected as I go along. What you saw when you compiled the code was a warning that something was not quite correct, not a red flagged error that would have stopped compilation.acostafulano » Mon Dec 21, 2020 11:28 am wrote:
This strange experience aside, I have proceeded and changed return(0) with return(false)
![]()
-
Sergio
- Trader
- Posts: 16
- Joined: Tue Jul 14, 2020 9:31 pm
Slopey Peaky Bob
Hi Dear Traders,
Happy 2021!
I have been testing SPB for quite a while now and it is fantastic!
Unfortunately, something strange happened today.
It closed all my trades without reaching the Basket_cash_take_profit.
Usually, I have Basket_cash_take_profit = 150 and it used to work fine until today.
Now, Basket_cash_take_profit = 1
I have deleted, re-downloaded and re-installed everything but I still have the same problem.
When I load the expert with AutoTrading disabled it shows Basket_cash_take_profit = 150 but when I enable AutoTrading something forces Basket_cash_take_profit = 1
Does anyone had the same problem or knows what is causing this?
Also, while trying to sort this out, I noticed that the SPB core library.mqh is not compiling properly and is generating 101 errors, most of the errors are undefined properties that probably come from the expert file.
Is this normal?
Happy 2021!
I have been testing SPB for quite a while now and it is fantastic!
Unfortunately, something strange happened today.
It closed all my trades without reaching the Basket_cash_take_profit.
Usually, I have Basket_cash_take_profit = 150 and it used to work fine until today.
Now, Basket_cash_take_profit = 1
I have deleted, re-downloaded and re-installed everything but I still have the same problem.
When I load the expert with AutoTrading disabled it shows Basket_cash_take_profit = 150 but when I enable AutoTrading something forces Basket_cash_take_profit = 1
Does anyone had the same problem or knows what is causing this?
Also, while trying to sort this out, I noticed that the SPB core library.mqh is not compiling properly and is generating 101 errors, most of the errors are undefined properties that probably come from the expert file.
Is this normal?
You do not have the required permissions to view the files attached to this post.
-
Maximilian
- Trader
- Posts: 150
- Joined: Sat Sep 06, 2014 2:43 pm
Slopey Peaky Bob
Hi,
There is a feature in some of Steves EAs called friday basket something, which scales down the basket size dependig on your local time. You might look out for that. It also happened once to me and drove me nuts until I finally found that extern Input.
Greetings,
Max
There is a feature in some of Steves EAs called friday basket something, which scales down the basket size dependig on your local time. You might look out for that. It also happened once to me and drove me nuts until I finally found that extern Input.
Greetings,
Max
-
Sergio
- Trader
- Posts: 16
- Joined: Tue Jul 14, 2020 9:31 pm
Slopey Peaky Bob
Hi Max,Maximilian » Sat Jan 09, 2021 8:29 am wrote:Hi,
There is a feature in some of Steves EAs called friday basket something, which scales down the basket size dependig on your local time. You might look out for that. It also happened once to me and drove me nuts until I finally found that extern Input.
Greetings,
Max
Thank you for your response, it helped a lot.
I had the FridayCloseHour = 24 but I also had the BasketFridayCashTarget = On
I thought they were the same feature but I was wrong.
Once I have deleted the BasketFridayCashTarget everything was fixed.
Having said that, I am still wondering, is it normal to get those error while compiling SPB core library.mqh ?
Thanks,
Stergio
You do not have the required permissions to view the files attached to this post.
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Slopey Peaky Bob
Yes, it is normal. This include files can not be compiled alone, as it uses elements defined in the main program.Sergio wrote:Having said that, I am still wondering, is it normal to get those error while compiling SPB core library.mqh ?
Happy pippin, Thomas 
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Slopey Peaky Bob
A little more general interest background information for you folks.
Computers run software in machine code, which is a loooooooonnnnnnngggggg series of 1's and 0's. This would be horrible to try to write, although that is how early programmers coded their software. It must have been a nightmare.
Instead we write code in the various 'high level' languages available - C, C++, Java, Python and so on. These all have their own 'reserved words' and syntax and the programmer creates the 'source code' using these. These are then compiled into the machine code that the computer can process.
Our own language here is MQL4. The source code files have the extension '.mq4' for example, "Slopey Peaky Bob.mq4". The reason you load an .mq4 file, shut down and restart your platform is this: the platform recognises there is a new .mq4 file and compiles it into a machine code file with the extension '.ex4' for example, "Slopey Peaky Bob.ex4". The platform only does this when the source file is brand new. When downloading updates we have to remember to delete the .ex4 file to force recompilation.
We can include a variety of 'libraries' in the compiled version. These are files with '.mqh' as well as '.mq4' extensions. Slopey Peaky Bob and all the other members of the SPB tribe all have calls to 'include' them at compilation time. SPB has these:
The first one tells the compiler to include Thomas' TDesk library to enable SPB to communicate with TDesk if desired. The second loads the SPB library of umpteen functions.
I can see no advantage to the user in this but the gain for the coder is vast. Imagine the logic is wrong in a function, or can be improved or amended. Thinking about SPB, all I need to do is edit the .mqh file. I do not need to edit and upload umpteen members of the SPB family.

Computers run software in machine code, which is a loooooooonnnnnnngggggg series of 1's and 0's. This would be horrible to try to write, although that is how early programmers coded their software. It must have been a nightmare.
Instead we write code in the various 'high level' languages available - C, C++, Java, Python and so on. These all have their own 'reserved words' and syntax and the programmer creates the 'source code' using these. These are then compiled into the machine code that the computer can process.
Our own language here is MQL4. The source code files have the extension '.mq4' for example, "Slopey Peaky Bob.mq4". The reason you load an .mq4 file, shut down and restart your platform is this: the platform recognises there is a new .mq4 file and compiles it into a machine code file with the extension '.ex4' for example, "Slopey Peaky Bob.ex4". The platform only does this when the source file is brand new. When downloading updates we have to remember to delete the .ex4 file to force recompilation.
We can include a variety of 'libraries' in the compiled version. These are files with '.mqh' as well as '.mq4' extensions. Slopey Peaky Bob and all the other members of the SPB tribe all have calls to 'include' them at compilation time. SPB has these:
Code: Select all
// TDesk code
#include <TDesk.mqh>
#include <SPB core library.mqh>I can see no advantage to the user in this but the gain for the coder is vast. Imagine the logic is wrong in a function, or can be improved or amended. Thinking about SPB, all I need to do is edit the .mqh file. I do not need to edit and upload umpteen members of the SPB family.
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.