Scalping New York

Post Reply
User avatar
sangratan
Trader
Posts: 56
Joined: Thu Feb 24, 2022 9:39 am
Location: Pisa

Scalping New York

Post by sangratan »

I don't understand
TableTop
Trader
Posts: 84
Joined: Wed Oct 20, 2021 12:36 pm

Scalping New York

Post by TableTop »

sangratan » Wed May 25, 2022 2:45 pm wrote:nothing happens ,it doesn't work
Strange - could it be a data issue? I've found that if I get this type of issue and open each chart, and click on a few timeframes it seems to re-boot the data feed. I do have it working fine on 3 instances so I don't think it can be a code issue.
User avatar
sangratan
Trader
Posts: 56
Joined: Thu Feb 24, 2022 9:39 am
Location: Pisa

Scalping New York

Post by sangratan »

the strange thing is that yesterday the first version (with no BE and Closures ) worked perfectly
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 think this is the reason for not opening:

In testForAlreadyTradedThisHour()

Add the last 3 lines to the code, the Ea wont open if it finds trades in the same hours in previous days

for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
{
if (!BetterOrderSelect(cc, SELECT_BY_POS, MODE_HISTORY) )
continue;//Shouldn't happen, but no harm in making sure

if (TimeDay(OrderOpenTime()) != TimeDay(TimeLocal()))continue;
if (TimeMonth(OrderOpenTime()) != TimeMonth(TimeLocal()))continue;
if (TimeYear(OrderOpenTime()) != TimeYear(TimeLocal()))continue;
You think the rumbling comes from our "magic" black-box ?
User avatar
sangratan
Trader
Posts: 56
Joined: Thu Feb 24, 2022 9:39 am
Location: Pisa

Scalping New York

Post by sangratan »

Wow...... :yahoo: :yahoo: :yahoo: :yahoo: :yahoo: :yahoo: :youknow: :youknow: :youknow: :youknow: :youknow:
you are a magician.....
In these moments I wuold be a coder to understand how is it possible to fix ....
wonderful
many,many thanks
I 'll look if all it's right in the first session
thanks again
You do not have the required permissions to view the files attached to this post.
User avatar
sangratan
Trader
Posts: 56
Joined: Thu Feb 24, 2022 9:39 am
Location: Pisa

Scalping New York

Post by sangratan »

:arrrg: :arrrg: :arrrg: :arrrg: :arrrg:
noooo,
after closed the first TP it stop working and now I am not able to start it again
grrrr
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 » Wed May 25, 2022 3:27 pm wrote:I think this is the reason for not opening:

In testForAlreadyTradedThisHour()

Add the last 3 lines to the code, the Ea wont open if it finds trades in the same hours in previous days

for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
{
if (!BetterOrderSelect(cc, SELECT_BY_POS, MODE_HISTORY) )
continue;//Shouldn't happen, but no harm in making sure

if (TimeDay(OrderOpenTime()) != TimeDay(TimeLocal()))continue;
if (TimeMonth(OrderOpenTime()) != TimeMonth(TimeLocal()))continue;
if (TimeYear(OrderOpenTime()) != TimeYear(TimeLocal()))continue;
The joy of free, open source coding. Thanks Ben. You are a star. :clap: :clap: :clap: :clap: :clap:

I had not experienced this issue because I was only maintaining today's orders in my history tab. I have added Ben's fix and added the update to post 1.

DIYers, do a search for:
if (closeHour == hourBroker)

Add this underneath the return(true);//Yes, so no more trading until a new H1 candle forms. command/statement:

Code: Select all

      /*We have pivotter (Ben) to thank for spotting why Scalpy would stop
        trading altogether. Go to https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=174598#p174598
        to read his post.
        
        Ben also supplied the code. Break out of the loop as soon
        as we find an order that was not sent today - broker time
      */   
      if (TimeDay(OrderOpenTime()) != TimeDay(TimeCurrent())) break;
      if (TimeMonth(OrderOpenTime()) != TimeMonth(TimeCurrent())) break;
      if (TimeYear(OrderOpenTime()) != TimeYear(TimeCurrent())) break;
Please include the comment just in case you share the code elsewhere - you all know by now that I like to acknowledge the contributions of other coders.

: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
sangratan
Trader
Posts: 56
Joined: Thu Feb 24, 2022 9:39 am
Location: Pisa

Scalping New York

Post by sangratan »

:hi: :hi: :hi:
It seems that it works without problems.....
fingers crossed and silence .....I'll see going on
thanks for your help
You do not have the required permissions to view the files attached to this post.
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 »

The earlier bloops with BE and auto-close cost the demo just over $1,000.

Since the fixes:
  • TP $30
  • BE wait time 1 hour
  • Auto-close 2 hours
None of the non-TP closures needed. 7 baskets closed at TP when I started writing this and an 8'th whilst typing.

Are we onto something here?

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

sangratan » Tue May 24, 2022 2:25 pm wrote:Hi Steve......thanks for your jewel......
the power of CSS 's strenght togheter with MS is incredible ,
practically a machine gun following mostly currencie's strenght...
thanks again
I am not ignoring this - let's get the basics correct first.

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