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

Scalping New York
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=6189
Page 12 of 31
Author:  SteveHopwood [ Fri May 27, 2022 1:38 pm ]
Post subject:  Scalping New York

I have edited post 1. To replace Multiple Scalpy with Scalpy:
  • Save your current inputs.
  • Remove Multiple Scalpy from your chart.
  • Delete the original version of Scalpy.
  • Shut down the platform.
  • Download the version attached to post 1.
  • Restart the platform.
  • Drag Scalpy onto a chart and load up your set file.
Re-download it anyway if you are not a DIYer because I realised the extra display detail needed another conditional. If you are a DIYer, do a search for:
SM("Trading hours: " + TradingHours + " (Local time)" + NL);

Underneath that is the block of code that sets up the elements to display. It needs to select the earliest order, so replace the block with this one:

Code: Select all

   if (openTrades > 0)
   {
      //Select oldest order
      if (betterOrderSelect(oldestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES) )
      {
         datetime breakEvenStarts = calculateBreakEvenStartTime();
         datetime autoCloseStarts = calculateAutoCloseTime();
         SM("Breakeven time " + TimeToStr(breakEvenStarts, TIME_MINUTES) 
         + ": Automatic close time " + TimeToStr(autoCloseStarts, TIME_MINUTES) + " (Both are broker time)" + NL);   
      }//if (betterOrderSelect(oldestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES) )
      
   }//if (openTrades > 0)
:xm: :rocket:
Author:  SteveHopwood [ Fri May 27, 2022 1:46 pm ]
Post subject:  Scalping New York

biobier » Fri May 27, 2022 9:58 am wrote:I'm a bit late to the show but this looks great!
Just a question why not use UTC times (UTC is the new GMT) in the setting? Then we would not need to bother adjusting to the local/brokers time as UTC is everywhere the same. https://time.is/en/UTC
London open is 07 UTC and NY is 12 UTC. https://www.babypips.com/tools/forex-market-hours
Thanks. Just to make sure I understand, anyone, anywhere in the world, under the sea or out in space, could use 7 UTC and 12 UTC as their inputs?

:xm: :rocket:
Author:  biobier [ Fri May 27, 2022 2:41 pm ]
Post subject:  Scalping New York

SteveHopwood » Fri May 27, 2022 2:46 pm wrote: Thanks. Just to make sure I understand, anyone, anywhere in the world, under the sea or out in space, could use 7 UTC and 12 UTC as their inputs?

:xm: :rocket:
Yes exactly (except out in space as time is bound to gravity, but that is another topic: "gravitational time dilation") :D
Author:  SteveHopwood [ Fri May 27, 2022 2:44 pm ]
Post subject:  Scalping New York

biobier » Fri May 27, 2022 2:41 pm wrote:
SteveHopwood » Fri May 27, 2022 2:46 pm wrote: Thanks. Just to make sure I understand, anyone, anywhere in the world, under the sea or out in space, could use 7 UTC and 12 UTC as their inputs?

:xm: :rocket:
Yes exactly (except out in space as time is bound to gravity, but that is another topic: "gravitational time dilation") :D
Fantastic. Thanks for a brilliant contribution. :clap: :clap: :clap: :clap: :clap: :clap: :clap:

:xm: :rocket:
Author:  SteveHopwood [ Fri May 27, 2022 2:58 pm ]
Post subject:  Scalping New York

biobier » Fri May 27, 2022 9:58 am wrote:I'm a bit late to the show but this looks great!
Just a question why not use UTC times (UTC is the new GMT) in the setting? Then we would not need to bother adjusting to the local/brokers time as UTC is everywhere the same. https://time.is/en/UTC
London open is 07 UTC and NY is 12 UTC. https://www.babypips.com/tools/forex-market-hours

I use this code:
Another quick question. Why 2 functions that appear to do the same thing?

:xm: :rocket:
Author:  SteveHopwood [ Sat May 28, 2022 1:34 pm ]
Post subject:  Scalping New York

Live last week, New York only, 3 BE and 2 TP:
Live last week.png
-----------
I have added biobier's UTC code. The relevant input is TimeSourceToUse; this defaults to London and New York open i.e. 7 and 12 UTC. Download from post 1.

:xm: :rocket:
Author:  wallywonka [ Sun May 29, 2022 3:24 am ]
Post subject:  Scalping New York

Steve that’s a great result for London open! :clap: or

Did you run New York also? How did that go in comparison?

Cheers Wally
Author:  SteveHopwood [ Sun May 29, 2022 10:05 am ]
Post subject:  Scalping New York

wallywonka » Sun May 29, 2022 3:24 am wrote:Steve that’s a great result for London open! :clap: or

Did you run New York also? How did that go in comparison?

Cheers Wally
I meant to write New York only. I am adding London next week.

:xm: :rocket:
Author:  biobier [ Sun May 29, 2022 10:35 am ]
Post subject:  Scalping New York

SteveHopwood » Fri May 27, 2022 3:58 pm wrote:
Another quick question. Why 2 functions that appear to do the same thing?

:xm: :rocket:
The parameter differ as sometimes you might want to get MqlDateTime type structure instead of datetime type. Just take the one you like to use :-)
Author:  SteveHopwood [ Sun May 29, 2022 12:11 pm ]
Post subject:  Scalping New York

biobier » Sun May 29, 2022 10:35 am wrote:
SteveHopwood » Fri May 27, 2022 3:58 pm wrote:
Another quick question. Why 2 functions that appear to do the same thing?

:xm: :rocket:
The parameter differ as sometimes you might want to get MqlDateTime type structure instead of datetime type. Just take the one you like to use :-)
Thanks. I figured that was the case - just wanted to make sure.

:xm: :rocket:
All times are UTC Page 12 of 31