Hacking away at SPB

Post Reply
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Hacking away at SPB

Post by BobbyT »

Hi All,

It's been a while since I've coded anything (in metacraplanguage4) so I thought I would I'd have a play with SBP. Not the lightest task but one I feel up to.

The idea is to modify the dashboard component so it displays more timeframes for PHPL and SS. I have also added a button which should allow me to activate/deactivate the EA on any given pair thus essentially creating a manual-auto trader. Or an auto-manual trader. I'm not sure what it makes it but you get the idea.

So, on to the problem.

There seems to be a problem with the Peaky display (or with my understanding of the code; or both).

Take CHFJPY for arguments sake. I have included a screen capture of the dashboard and the D1/W1 CHFJPY charts for illustrative purposes.

We can see in the dash img that H4/D1/W1 PK are untradeable (gray arrows). However, when you inspect these charts, D1 and W1 appear to fit the rules as stipulated in the EA (they are in the upper half of the range defined by PHPL indicator). The fat blue line is the D1 midpoint and the fat pink line is the W1 midpoint. Price is above these lines for the respective timeframes.

Have I ballsed something up here or is there something in the almost 6000 lines of SPB code I have failed to notice.

Cheers,
BobbyT

EDIT: I forgot to mention, in case someone decides to eye ball this on a chart without looking at the code, that the BarsOnChart setting for W1 peaky is 1000, because time.
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Hacking away at SPB

Post by renexxxx »

BobbyT,

You have to change lines 2157, 2162, 2184, 2189 2211 and 2216 in your code. I will leave it for you to figure out what you need to change ...

R.
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Hacking away at SPB

Post by BobbyT »

renexxxx » Sat Apr 14, 2018 9:43 pm wrote:BobbyT,

You have to change lines 2157, 2162, 2184, 2189 2211 and 2216 in your code. I will leave it for you to figure out what you need to change ...

R.
Ah the good old 'copy & paste and forget to change the variables trick!'

Thanks for saving me Rene.....again :arrrg: . If I ever make it home, let alone to that end of the country, I dare say I owe you a beer or two :hi:
Procrastination provides exponentially negative returns - BobbyT
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.

Hacking away at SPB

Post by SteveHopwood »

BobbyT » Sun Apr 15, 2018 4:27 pm wrote:
Ah the good old 'copy & paste and forget to change the variables trick!'
Oy. Gerroff. That is my trick. :lol: :lol: :lol:

:xm: :rocket:
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.
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Hacking away at SPB

Post by BobbyT »

SteveHopwood » Sun Apr 15, 2018 2:09 pm wrote: Oy. Gerroff. That is my trick. :lol: :lol: :lol:

:xm: :rocket:
Just trying to share the shame mate :smile:
Procrastination provides exponentially negative returns - BobbyT
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.

Hacking away at SPB

Post by SteveHopwood »

Re:
There seems to be a problem with the Peaky display (or with my understanding of the code; or both).
Here is another problem, and one I was secretly hoping to avoid. All of last week I was trading EU Peaky on D1 SS and H1 Peaky.

All week last week, SPB was insisting that H1 Peaky was long when it was clearly short. I even restarted the demo several times. The damn thingy even took a few fortuitously successful long trades. Frankly, I was just hoping I was looking at the chart incorrectly.

Dream on.

So yes, there is a bug lurking there somewhere and I have no clue whatsoever where to start looking for it. I shall start bug-hunting in the morning. It will be something stupidly simple that will take days to hunt down. :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:

Just be aware when updating your version, ok? Also, did you see my post earlier about the Friday trade closure/deletion stuff earlier? Bear it in mind.

:xm: :rocket:

Or should this be:
:xm: :rocket: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg: :arrrg:
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 “Coders Hangout”