Scalping New York
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Scalping New York
Scalpy suddenly started trying to send orders even though the markets are closed. Disable experts for now or you will have some massive log files.

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.
- pivotter
- Trader
- Posts: 38
- Joined: Sun May 01, 2016 12:02 am
- Location: The Hague, The Netherlands
Scalping New York
Sure, attached the Scalpy with ForceloadHistory.SteveHopwood » Sat Jun 04, 2022 1:37 pm wrote:That is a great idea. Can you post the code please, so I can add it?pivotter » Fri Jun 03, 2022 8:46 pm wrote:but i also cheated as i added ForceLoadHistoricalData() to the top of sendBasket() to make sure all H! and H4 candles are updated before all symbols are scanned,
![]()
2 lines are added to the top of sendBasket()
//All symbols in marketpanel
ForceLoadHistoricalData();
Sleep(120000);//sleep 2 min so Empty4 can update the history file
You might want to set TradingWaitMinutes=3; to compensate for the 2 waiting minutes,
The 3 required functions, adapted to load only H1 and H4 in this case are at the bottom of the file.
void ForceLoadHistoricalData()
bool ForceLoadOneSym(
int barsWithRetry(
//---------
The file was updated to fix a bug that prevented it from trading on June 7
Ben
You do not have the required permissions to view the files attached to this post.
Last edited by pivotter on Tue Jun 07, 2022 8:36 am, edited 5 times in total.
You think the rumbling comes from our "magic" black-box ?
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Scalping New York
Yes Steve, correct.
Only thing that can happen is a delay between adding the symbol to the market watch list and this symbols quotes being completely up-to-date. If you place it just before evaluating the data series, you might probably still get wrong data in the first pass.
You could do the following to skip this pass for a symbol that got just added:
All those other workarounds might cause more problems than they solve.
Only thing that can happen is a delay between adding the symbol to the market watch list and this symbols quotes being completely up-to-date. If you place it just before evaluating the data series, you might probably still get wrong data in the first pass.
You could do the following to skip this pass for a symbol that got just added:
Code: Select all
if(!SymbolInfoInteger(symbol,SYMBOL_SELECT))
{ SymbolSelect(symbol,true);
continue;
}
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.
Scalping New York
I am starting to agree with you - who would not? I have removed the code I posted earlier and that you quote.tomele » Sat Jun 04, 2022 3:04 pm wrote:Yes Steve, correct.
Only thing that can happen is a delay between adding the symbol to the market watch list and this symbols quotes being completely up-to-date. If you place it just before evaluating the data series, you might probably still get wrong data in the first pass.
You could do the following to skip this pass for a symbol that got just added:All those other workarounds might cause more problems than they solve.Code: Select all
if(!SymbolInfoInteger(symbol,SYMBOL_SELECT)) { SymbolSelect(symbol,true); continue; }
The one change I have made is to add code to move a pair to the Market Watch window from within the extractPairs() function, should it not be there already. extractPairs() is called from within OnInit() and converts our PairsToTrade input into an array that the code can use.
Here is the updated function so you bloop spotters can spot any bloops.
Code: Select all
void extractPairs()
{
int pairIndex = 0;
//Read the pairs into a temporary array so that
//pairs not offered by the broker are removed.
string tempTradePair[];
StringSplit(PairsToTrade,',',tempTradePair);
noOfPairs = ArraySize(tempTradePair);
int tempIndex = 0;
string symbol = "";
//Save the pairs offered by the broker into the tradePair array
//hecking first that the broker offers the pair.
for (pairIndex = 0; pairIndex < noOfPairs; pairIndex ++)
{
symbol = tempTradePair[pairIndex];
symbol = StringTrimLeft(symbol);
symbol = StringTrimRight(symbol);
symbol = StringConcatenate(PairPrefix, symbol, PairSuffix);
getBasics(symbol);//Returns zero for the Bid if the symbol is not offered.
if (!closeEnough(bid, 0) )
{
tempIndex++;
ArrayResize(tradePair, tempIndex);
tradePair[tempIndex - 1] = symbol;
}//if (!closeEnough(bid, 0) )
}//for (pairIndex = 0; pairIndex < noOfPairs; pairIndex ++)
noOfPairs = tempIndex;//Not used again in this code, but store it for possible future use.
//Now ensure the user has each of their pairs in the Market Watch window.
//Most likely they will but hey, why not? We can all make mistakes
for (pairIndex = 0; pairIndex < ArraySize(tradePair); pairIndex++ )
{
//This next command forces the pair into the Market Watch window. I think.
SymbolSelect(tradePair[pairIndex], true);
}//for (pairIndex = 0; pairIndex < ArraySize(tradePair); pairIndex++ )
}//void extractPairs()
- Am I making money from my live account trading?
- Are my demo accounts testing different TP's etc powering ahead?
If the answer to either of them is, "No," then:
- Change your broker.
- Change your settings.
- Do so.
- Run test demos pitching your new code against the original and report favourable results. Especially you Ben, as you might be onto something useful. It is just that I have been like a hamster on a wheel before and I am too busy teaching these days to play that game. No intended disrespect to you.
None of what I have just written implies any criticism on my part of members who have suggested improvements. It is just that Scalpy is doing rather well, so let's not go chasing rabbits into warrens.
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.
Scalping New York
By-the-bye. Anyone know the code to stop Scalpy trying to send orders when the markets are shut for the weekend?

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
Scalping New York
Sure. Check whether the server time is changing. For example:
Code: Select all
datetime lastServerTime;
int OnInit()
{
lastServerTime=TimeCurrent();
...
}
void OnTimer()
{
if(!TimeCurrent()>lastServerTime) return;
lastServerTime=TimeCurrent();
...
}
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.
Scalping New York
Thanks Thomas. I should have worked that out for myself.tomele » Sat Jun 04, 2022 10:33 pm wrote:Sure. Check whether the server time is changing. For example:
Code: Select all
datetime lastServerTime; int OnInit() { lastServerTime=TimeCurrent(); ... } void OnTimer() { if(!TimeCurrent()>lastServerTime) return; lastServerTime=TimeCurrent(); ... }
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.
Scalping New York
V 1a is in post 1. Check that your download and recompilation has worked by looking at the version display underneath the time and date display.
I have added a step by step guide to installing updates in post 1.

I have added a step by step guide to installing updates in post 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.
-
getdown71
- Trader
- Posts: 15
- Joined: Wed Nov 16, 2011 11:12 pm
Scalping New York
Morning all,
Looks like Scalpy is maturing well!
Muchas kudos to the collab here.
Cheers,
Nick
Looks like Scalpy is maturing well!
Muchas kudos to the collab here.
Cheers,
Nick
-
Aussie Phil
- Posts: 9
- Joined: Tue Dec 06, 2011 9:05 am
Scalping New York
I rarely post less than 1 post per year over the last 10 years tells the story but I feel compelled.... My results from last week are exciting.
GP fresh demo $200
OOTB session times
.01 lots
$5.00 fixed TP
Net profit 11.2%
What needs to be taken into account is that Scalpy is a basket trader and a small $200 account will only allow 5 trades to open, of course that increases/decreases as the balance changes. Early days I know but my point is smaller lot sizes and target and still this simple and sound strategy delivered. No indicators, no gambling on mumbo jumbo, no bullshit.
Thanks Steve et al
GP fresh demo $200
OOTB session times
.01 lots
$5.00 fixed TP
Net profit 11.2%
What needs to be taken into account is that Scalpy is a basket trader and a small $200 account will only allow 5 trades to open, of course that increases/decreases as the balance changes. Early days I know but my point is smaller lot sizes and target and still this simple and sound strategy delivered. No indicators, no gambling on mumbo jumbo, no bullshit.
Thanks Steve et al