Scalping New York

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

Scalping New York

Post by biobier »

I have this issue only on my slow (busy) development system. I think that is the reason why only some ppl have that issue. The others run a proper sized system :P

However there still is something more than the previous error... Created a test script (attached).
See this part of the output especially the time for CADCHF:

Code: Select all

0	13:42:09.307	GetBarDetails AUDUSD,M5: Details last bar for AUDUSD 15: Time=2022.06.03 14:15:00, Open=0.7243000000000001, High=0.72514, Low=0.7242499999999999, Close=0.72484, Volume=1047
0	13:42:09.320	GetBarDetails AUDUSD,M5: Details last bar for CADCHF 15: Time=2022.04.28 12:45:00, Open=0.75662, High=0.7571099999999999, Low=0.75621, Close=0.7569900000000001, Volume=1800
0	13:42:09.336	GetBarDetails AUDUSD,M5: CADCHF Got error (4066): requested history data is in update state Will etry
0	13:42:09.336	GetBarDetails AUDUSD,M5: Details last bar for CADCHF 15: Time=2022.04.28 12:45:00, Open=0.75662, High=0.7571099999999999, Low=0.75621, Close=0.7569900000000001, Volume=1800
0	13:42:09.336	GetBarDetails AUDUSD,M5: Details last bar for CADJPY 15: Time=2022.06.03 14:15:00, Open=103.481, High=103.534, Low=103.466, Close=103.514, Volume=1720
Time=2022.04.28 12:45:00 WTF? 14:15 is the right one. Running the script again that symbol get the right time. Feel free to play around with the script. But I think we are getting closer....
You do not have the required permissions to view the files attached to this post.
Last edited by biobier on Fri Jun 03, 2022 4:21 pm, edited 1 time in total.
Must-reads for FOREX NOOBS as me:
Help for Newbies.
Information For Beginners
lemur6666
Trader
Posts: 69
Joined: Mon Nov 27, 2017 8:29 am

Scalping New York

Post by lemur6666 »

I just thought of a work around . What if we took close of previous M5 candle and refer ourselves to the open 12 candles back. It will not be H1, but its close enough. Or M1 candle with reference to 60 candles back... Either way we should have our historical candles on M5/M1 by the time scalpy needs them. :idea:
User avatar
pivotter
Trader
Posts: 38
Joined: Sun May 01, 2016 12:02 am
Location: The Hague, The Netherlands

Scalping New York

Post by pivotter »

i was thinking of another approach , collect the bid prices of all pairs and store them at open time minus 1 hour and compare that.

Still this problem can better be inspected till it is solved as it has consequences on every use of iOpen and iClose.
You think the rumbling comes from our "magic" black-box ?
User avatar
FundedCoffee
Trader
Posts: 30
Joined: Sat Apr 16, 2022 8:47 pm

Scalping New York

Post by FundedCoffee »

celte83 » Fri Jun 03, 2022 4:20 am wrote: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
and then you are going to have times where price hits your Target, but you only got a breakeven.

breakeven always sounds like it makes a lot of sense. Why? Because we dont like losing. More of than not taking losses is much more profitable in the long run though.

We are trading with a bot, we have the benefit of not needing to be in front of the charts, not needing to look at the current open trade, not needing to watch how our balance is in drawdown.

Use it to your advantage.
Trading is simple, but not easy
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 »

biobier » Fri Jun 03, 2022 8:02 am wrote: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.
The reason I did not bother with this in the first place is that Scalpy is a whole position basket trader. Only an idiot then tries other strategies at the same time.

Leaving out the magic number check is a protection measure for the dimwits - and a deliberate one.

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

biobier » Fri Jun 03, 2022 10:57 am wrote: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;
}
Fantastic again. Unbelievable. Stunning. :clap: :clap: :clap: :clap: :clap: :clap: :clap:

Consider this done. I will make the update tomorrow.

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

I decided to make the changes offered by biobier immediately, so the latest version is attached here, so you folks can check the code (not his - mine). I will make this the post 1 version before the markets open after the weekend.

You will find biobier's latest iiOpen() etc functions immediately above OnTimer(). I have made the requisite edits to void getDirection(string symbol, int tf, int pairIndex)

I am still thinking about adding the magic number check.

:xm: :rocket:
You do not have the required permissions to view the files attached to this post.
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 »

pivotter » Fri Jun 03, 2022 2:08 pm wrote:i was thinking of another approach , collect the bid prices of all pairs and store them at open time minus 1 hour and compare that.

Still this problem can better be inspected till it is solved as it has consequences on every use of iOpen and iClose.
Imaginative, or what? :clap: :clap: :clap: :clap: :clap: :clap: :clap:

As you say, better if we can solve the problem but your idea is something to bear in mind. Please store it somewhere safely so you do not forget it, in case we have to resort to it.

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

I am looking at demo results for the two accounts I have listed in post 1. Istarted the dynamic TP demo on 4th April 2022. Comparing the profitability of the two over the same time period:
  • Dynamic TP: +$634
    '
  • Hard' tp of $100: +$585
Not a lot of difference so too early to draw conclusions.

One thingy we can say with confidence is: this is damn good fun. :clap: :clap: :clap: :clap: :clap: :clap:

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

One final one from me tonight.

Today was NFP; I advised people to stay out of the markets and did so myself live. I left the demos running.

My London baskets closed at BE +$44 (0.1 lots).

Both NY baskets hit their TP within an hour or so of opening - the dynamic TP being $120.

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

Return to “Automated trading systems”