Scalping New York

Post Reply
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

Scalping New York

Post by biobier »

Did a google search and that seems to be a common problem that iClose can return 0 if data was not refreshed.
https://www.mql5.com/en/forum/231717

The very last post there tells also to just try again if it returns 0. So your solution for this craperquotes "feature" is good!

Code: Select all

double x=iClose(Symbol(),PERIOD_H1,1);
Sleep(1);
x=iClose(Symbol(),PERIOD_H1,1);
Might be worth to create wrapper functions for this to be reused in other EA's Something like

Code: Select all

double iiOpen(string symbol,int  timeframe,  int shift){
   double copen=0;
   while (closeEnough(copen, 0) )
      copen = iOpen(symbol, timeframe, shift);
   return copen;
}
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
wallywonka
Trader
Posts: 188
Joined: Thu May 12, 2016 7:46 am

Scalping New York

Post by wallywonka »

Unfortunately I have to report that my fresh install global prime demo is still opening wrong trades using the new code :(

This was at London open
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

Scalping New York

Post by thomasmore »

wallywonka » 02 Jun 2022, 09:56 wrote:Unfortunately I have to report that my fresh install global prime demo is still opening wrong trades using the new code :(
Same here. 15 trades opened, 3 in the wrong direction.
celte83
Trader
Posts: 157
Joined: Sat Jan 21, 2012 7:51 pm
Location: Gonfaron - Var 83 - France

Scalping New York

Post by celte83 »

Hi,
based on my bad experience yesterday in London where the basket fell 0.07 cents from the target to end at -170!
I would like on the scalpy EA, a possibility of BE after a certain positive score. And not just a hypothetical possibility of BE after 2 hours.
In the meantime, I have this option managed by MPBM. And so this morning's basket came out at BE after a High-Water mark at 30 pips.
Ok it's DIY but waiting for Scalpy to evolve (or not) in this direction...

Thank you anyway for sharing this strategy ... amazing, surprising, but effective

Santé
jf
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.

Scalping New York

Post by SteveHopwood »

I also had trades opened in the 'wrong' direction.

Folks, coders here know what it is to battle the vagaries of empty4. Trust me, we try to deal with them. We have spent over a decade trying to deal with them. Sometimes there is fuck all we can do. All we can do is work with the data provided to us by interrogating the various commands at our disposal. Bugger all we can do if the data provided to us is crap. No idea if it is in this case, but some seriously expert coders have studied my code and found nothing wrong. Trust me folks, they have been doing so all day long.

Coders, tomorrow I shall add code to ensure that my program wide variables 'ask' and 'bid' peopled from within getBasics(symbol) are not = 0. Do I think this will make a scrap of difference? Of course I bloody well don't.

To the rest of you, ask yourself this, "Is my balance increasing whilst my end of day DD is zero?" If the answer is, "Yes," then accept that we might just possibly be onto something magnificent here and forget that it is not perfect.

Then remember The Law of Big Numbers and hope that it applies to Scalpy. For sure, I am in profit trading live so far.

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

Scalping New York

Post by SteveHopwood »

celte83 » Thu Jun 02, 2022 9:12 am wrote:Hi,
based on my bad experience yesterday in London where the basket fell 0.07 cents from the target to end at -170!
I would like on the scalpy EA, a possibility of BE after a certain positive score. And not just a hypothetical possibility of BE after 2 hours.
In the meantime, I have this option managed by MPBM. And so this morning's basket came out at BE after a High-Water mark at 30 pips.
Ok it's DIY but waiting for Scalpy to evolve (or not) in this direction...

Thank you anyway for sharing this strategy ... amazing, surprising, but effective

Santé
jf
Stop wittering about this. Scalpy is doing quite well, after all.

Scalpy will have losing days, although not yet in my experience.

Scalpy will have losing weeks, although not yet in my experience.

Scalpy may have losing months. Fingers crossed not. Let's not get into losing years.

Instead of whining about your experience, prove that we need a BE stop loss. Set up two demos simultaneously. One with a BE stop loss managed by MBPM and one without. Post the account login details so we can all follow along with their progress and post regular results.

Or shut up.

: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.
fx800
Trader
Posts: 1334
Joined: Sun Dec 04, 2011 4:11 am

Scalping New York

Post by fx800 »

Hi Steve,

:hi: :hi: :hi:

I applaud your common sense. As the saying goes, the proof of the pudding is in the eating. If it ain't broke, why fix it.

peter
Last edited by fx800 on Fri Jun 03, 2022 5:52 am, edited 1 time in total.
celte83
Trader
Posts: 157
Joined: Sat Jan 21, 2012 7:51 pm
Location: Gonfaron - Var 83 - France

Scalping New York

Post by celte83 »

Salut,
One more chance: I haven't been called a moron. Not yet. :D :D :D . Maybe is it the "single malt" effect ...

Idea for a breakeven settings for scalpy sounds like it makes a lot of sense, especially when you are a few cents away from the goal and you end up with a loss of twice the goal. And only one option It seems so obvious for experienced people... but ... I shut up,
thank you Sir

:hi:
jf
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

Scalping New York

Post by biobier »

Spotted that in function testForAlreadyTradedThisHour it is checked for all orders (not for our magicnumber only)

Code: Select all

      if (OrderMagicNumber() != MagicNumber) continue;
Need to be added.
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
biobier
Trader
Posts: 72
Joined: Mon Mar 18, 2019 7:24 am

Scalping New York

Post by biobier »

I think I found the issue with the wrong direction.
I've added error check after the call to iClose/iOpen and got:
Scalpy EURAUD,M15: getDirection AUDNZD Scalpy error(4066): requested history data is in update state
So I suggest we check for errors 4066/4073 and try again untill there is no error.

I suggest to wrap this in a helper function for reusabilty:

Code: Select all

double iiOpen(string symbol,int  timeframe,  int shift){
   GetLastError();//reset possible uncatched error
   double copen=iOpen(symbol, timeframe, shift);
   int err=GetLastError();
   while (closeEnough(copen, 0) || err>0){
      copen = iOpen(symbol, timeframe, shift);
      err=GetLastError();
      if(err>0) Sleep(10);
   }
   return copen;
}
double iiClose(string symbol,int  timeframe,  int shift){
   GetLastError();//reset possible uncatched error
   double cclose=iClose(symbol, timeframe, shift);
   int err=GetLastError();
   while (closeEnough(cclose, 0) || err>0){
      cclose = iClose(symbol, timeframe, shift);
      err=GetLastError();
      if(err>0) Sleep(10);
   }
   return cclose;
}
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
Post Reply

Return to “Automated trading systems”