As a wise man once said: "Not even the merest beginnings of the slightest hint of the opening gambit of a clue".
OrderType(), OrderTakeProfit() and OrderOpenPrice() seem to be ok.
Peaky on Steroids
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Peaky on Steroids
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
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Peaky on Steroids
In line 2312, change the call (add symbol)taipan » 27 Jun 2017, 15:33 wrote:Is it this statement to be repalced:" LookForTradingOpportunities(symbol, cc);" with your code?
Around line 1884, overwrite the function with my version.
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.
Peaky on Steroids
V 1d is in post 1 with Thomas' fix for the codaphobes here.
It is a curious problem that cropped up. Here is what I am surmising. We type the code in a 'high level' language that is 'compiled' into machine code that the computer can 'read'.
I did a BBC Assembler course about 1,000 years ago. As I recall, it is all about accessing, manipulating and signposting memory locations - you can think of computer memory as being lots and lots of storage boxes that contain information. Somehow, the location that is holding the OrderSymbol() is being overwriten, or maybe the signpost that should be pointing to a particular memory location has been turned around by that jealous Dotty someone mentioned earlier.
It is a wonder that stuff like this does not happen more often. We are torturing crapql4 with stuff it was never intended to cope with.

It is a curious problem that cropped up. Here is what I am surmising. We type the code in a 'high level' language that is 'compiled' into machine code that the computer can 'read'.
I did a BBC Assembler course about 1,000 years ago. As I recall, it is all about accessing, manipulating and signposting memory locations - you can think of computer memory as being lots and lots of storage boxes that contain information. Somehow, the location that is holding the OrderSymbol() is being overwriten, or maybe the signpost that should be pointing to a particular memory location has been turned around by that jealous Dotty someone mentioned earlier.
It is a wonder that stuff like this does not happen more often. We are torturing crapql4 with stuff it was never intended to cope with.
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.
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Peaky on Steroids
Thats exactly what I think. The copy process from the server to the local buffer might also got corrupted in the latest version. It used to work before.Somehow, the location that is holding the OrderSymbol() is being overwriten, or maybe the signpost that should be pointing to a particular memory location has been turned around by that jealous Dotty someone mentioned earlier.
What do we do with the other instances of OrderSymbol() in the code?
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.
Peaky on Steroids
Nothing. It turns out I had made a schoolboy error that leaped off the page as soon as I looked. Look at line 1903:tomele » Tue Jun 27, 2017 5:46 pm wrote:Thats exactly what I think. The copy process from the server to the local buffer might also got corrupted in the latest version. It used to work before.Somehow, the location that is holding the OrderSymbol() is being overwriten, or maybe the signpost that should be pointing to a particular memory location has been turned around by that jealous Dotty someone mentioned earlier.
What do we do with the other instances of OrderSymbol() in the code?
if (!DoesStopOrderExist(symbol, OP_SELLSTOP, price, dd))
DoesStopOrderExist(.........) cycles through the orders list and so the wrong OrderSymbol() is selected. The original code would have been fine if I had reselected LatestTradeTicketNo.
The Take Profit is correct because I set it before calling DoesStopOrderExist(.........).
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.
- Zool
- Trader
- Posts: 50
- Joined: Wed May 09, 2012 8:39 pm
- Location: Komárom, Hungary
Peaky on Steroids
Here is my other observation about the "FollowAdverseMarketWithStopOrders" function:
I'm running Peaky on H1 on a demo account, and it took almost the same sell on EURJPY that PoS took on an other account. The EURJPY decided to go against the sell order.
Peaky started to place stop orders behind the price building a grid of sell stops, and there is the basket TP on those sells, so when a retracement comes, it doesn't need to make that big movement down to reach the basket TP because of the grid.
PoS had some problems with the add-on orders, but after tomele found the solution it placed a sell stop at the correct place at time (MarketDistancePips/2). Now here comes the weird thing: PoS moved this stop order up just below the trading zone (bufferpips amount below the sixth) it was the 1st order. It keeps moving up the stop order since then, as EURJPY making new peaks instead of building up a grid of sell stops. With this kind of behaviour PoS will need a much bigger retracement to exit this trade since there will be no grid.
Attached a picture about Peaky and PoS for comparsion. The PoS a bit messy because it has 4 timeframe's trades on it, the yellow line where was the add-on trade opened, and now you can see that stop order moved to the top of chart (the sell stop sitting at the highest).
I'm running Peaky on H1 on a demo account, and it took almost the same sell on EURJPY that PoS took on an other account. The EURJPY decided to go against the sell order.
Peaky started to place stop orders behind the price building a grid of sell stops, and there is the basket TP on those sells, so when a retracement comes, it doesn't need to make that big movement down to reach the basket TP because of the grid.
PoS had some problems with the add-on orders, but after tomele found the solution it placed a sell stop at the correct place at time (MarketDistancePips/2). Now here comes the weird thing: PoS moved this stop order up just below the trading zone (bufferpips amount below the sixth) it was the 1st order. It keeps moving up the stop order since then, as EURJPY making new peaks instead of building up a grid of sell stops. With this kind of behaviour PoS will need a much bigger retracement to exit this trade since there will be no grid.
Attached a picture about Peaky and PoS for comparsion. The PoS a bit messy because it has 4 timeframe's trades on it, the yellow line where was the add-on trade opened, and now you can see that stop order moved to the top of chart (the sell stop sitting at the highest).
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
Peaky on Steroids
Gosh.. Right..SteveHopwood » 27 Jun 2017, 19:23 wrote:Nothing. It turns out I had made a schoolboy error that leaped off the page as soon as I looked. Look at line 1903:tomele » Tue Jun 27, 2017 5:46 pm wrote:Thats exactly what I think. The copy process from the server to the local buffer might also got corrupted in the latest version. It used to work before.Somehow, the location that is holding the OrderSymbol() is being overwriten, or maybe the signpost that should be pointing to a particular memory location has been turned around by that jealous Dotty someone mentioned earlier.
What do we do with the other instances of OrderSymbol() in the code?
if (!DoesStopOrderExist(symbol, OP_SELLSTOP, price, dd))
DoesStopOrderExist(.........) cycles through the orders list and so the wrong OrderSymbol() is selected. The original code would have been fine if I had reselected LatestTradeTicketNo.
The Take Profit is correct because I set it before calling DoesStopOrderExist(.........).
![]()
![]()
![]()
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.
Peaky on Steroids
V 1e is in post 1, with the positive swap trades only filter. From the updated user guide:

- Trade1PositiveSwapTradesOnly: this tells PoS to trade only when the swap on the trade will be positive. Trades can be open for a long time and negative swap causes pain. This also cuts down the number of potential trades – another help to avoiding over-trading.
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.
- John
- Trader
- Posts: 70
- Joined: Wed Nov 16, 2011 5:34 pm
- Location: Land of Entrapment (New Mexico)
Peaky on Steroids
Phenomenal work, Steve et al... Really impressed which, having been around these parts for quite some time, can't be understated!
Hey ho...
John

Hey ho...
John
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Peaky on Steroids
V 1f is in post 1, with another anti-overtrading filter. From the update user guide:

- MaxPairsAllowed: this is a filter to help avoid over trading. It tells PoS how many individual pairs are allowed to be trading at any one time.
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.