stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Scalping New York
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=6189
Page 18 of 31
Author:  biobier [ Thu Jun 02, 2022 7:47 am ]
Post subject:  Scalping New York

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;
}
Author:  wallywonka [ Thu Jun 02, 2022 7:56 am ]
Post subject:  Scalping New York

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
Author:  thomasmore [ Thu Jun 02, 2022 8:22 am ]
Post subject:  Scalping New York

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.
Author:  celte83 [ Thu Jun 02, 2022 9:12 am ]
Post subject:  Scalping New York

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
Author:  SteveHopwood [ Thu Jun 02, 2022 6:17 pm ]
Post subject:  Scalping New York

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:
Author:  SteveHopwood [ Thu Jun 02, 2022 8:16 pm ]
Post subject:  Scalping New York

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:
Author:  fx800 [ Fri Jun 03, 2022 3:12 am ]
Post subject:  Scalping New York

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
Author:  celte83 [ Fri Jun 03, 2022 4:20 am ]
Post subject:  Scalping New York

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
Author:  biobier [ Fri Jun 03, 2022 8:02 am ]
Post subject:  Scalping New York

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.
Author:  biobier [ Fri Jun 03, 2022 10:57 am ]
Post subject:  Scalping New York

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;
}
All times are UTC Page 18 of 31