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

Scalping New York
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=6189
Page 29 of 31
Author:  SteveHopwood [ Tue Jul 12, 2022 3:45 pm ]
Post subject:  Scalping New York

SWG123 » Tue Jul 12, 2022 2:46 pm wrote:In lines 1023 and 1063 – change "pairIndes" to "pairIndex"?
That has no effect but thanks for the thought. pairIndes was a typo. I have become used to declaring int pairIndex in the function definition because of the number of times I have needed to retro-fit after not bothering initially. pairIndes is not used in the function.

:xm: :rocket:
Author:  Tebis [ Thu Jul 21, 2022 4:29 pm ]
Post subject:  Scalping New York

I startet testing the EA from July, 1st. without intervention. I reduced CashProfitTarget to "50".
It looks like that its not a good Idea to trade monday or friday. Steve would it be a good Idea to add the "TradingDayOfWeek" to the code, so we can let Scalpy run the next months, fully automated ?
Author:  SteveHopwood [ Thu Jul 21, 2022 4:42 pm ]
Post subject:  Scalping New York

Tebis » Thu Jul 21, 2022 4:29 pm wrote:I startet testing the EA from July, 1st. without intervention. I reduced CashProfitTarget to "50".
It looks like that its not a good Idea to trade monday or friday. Steve would it be a good Idea to add the "TradingDayOfWeek" to the code, so we can let Scalpy run the next months, fully automated ?
Certainly will.

:xm: :rocket:
Author:  SteveHopwood [ Sat Jul 23, 2022 1:26 pm ]
Post subject:  Scalping New York

Version 1c is in post 1, in response to WorldsEnd request at https://www.stevehopwoodforex.com/phpBB ... 88#p174988

I realised how horribly complicated it would be to add Scalpy management to Desky as soon as I started to look into implementation. Far easier is to add the facility to manage trades only to Scalpy, so the new input is UseScalpyOnlyForManagement at the bottom of the General inputs section. You only need V 1c if you want this feature.

DIY could not be easier. Add this to the end of the General inputs, underneath extern string PairSuffix="";:
extern string sfm="-- Using Scalpy for management only --";
extern bool UseScalpyOnlyForManagement=false;

Then go to the end of the file and replace sendBasket(); with:

Code: Select all

   if (!UseScalpyOnlyForManagement)
      sendBasket();


:xm: :rocket:
Author:  SteveHopwood [ Sun Jul 24, 2022 1:12 pm ]
Post subject:  Scalping New York

V 1d is in post 1. I have added the trading day controls requested by Tebis. The inputs are underneath the Rollover inputs. You do not need the update if you do not intend using this feature.

DIY:
Add the inputs:

Code: Select all

string  sep8="================================================================";
string  tdc="---- Trading day controls ----"; 
extern bool    TradeSundayCandle=false;
extern bool    TradeMondayCandle=true;
extern bool    TradeTuesdayCandle=true;
extern bool    TradeWednesdayCandle=true;
extern bool    TradeThursdayCandle=true;
extern bool    TradeFridayCandle=true;
extern bool    TradeSaturdayCandle=false;
Add this function - it can go wherever you want.

Code: Select all

bool isTodayTradingDay()
{

   int d = TimeDayOfWeek(TimeLocal());

   
   //Sunday trading
   if (d == 0)
      if (!TradeSundayCandle)
         return(false);

   
   //Monday trading
   if (d == 1)
      if (!TradeMondayCandle)
         return(false);

   
   //Tuesday trading
   if (d == 2)
      if (!TradeTuesdayCandle)
         return(false);

   //Wednesday trading
   if (d == 3)
      if (!TradeWednesdayCandle)
         return(false);

   
   //Thursday trading
   if (d == 4)
      if (!TradeThursdayCandle)
         return(false);
    
   //Friday trading
   if (d == 5)
      if (!TradeFridayCandle)
         return(false);


   //Saturday trading
   if (d == 6)
      if (!TradeSaturdayCandle)
         return(false);
      
   //Got here, so today is a trading day
   return(true);

}//End bool isTodayTradingDay()
Go to the basket sending code just above the end of the file and change it to this:

Code: Select all

   //Send a basket
   if (!UseScalpyOnlyForManagement)
      if (isTodayTradingDay() )
         sendBasket();
:xm: :rocket:
Author:  Tebis [ Tue Jul 26, 2022 1:12 pm ]
Post subject:  Scalping New York

SteveHopwood » 24 Jul 2022, 15:12 wrote:V 1d is in post 1. I have added the trading day controls requested by Tebis. ]

:xm: :rocket:
Thanks a lot Steve :good: :good:
Author:  Tebis [ Thu Aug 04, 2022 2:52 pm ]
Post subject:  Scalping New York

Scalpy is setup to trade only 3 days a week. My results:
Author:  SteveHopwood [ Thu Aug 04, 2022 3:03 pm ]
Post subject:  Scalping New York

Tebis » Thu Aug 04, 2022 2:52 pm wrote:Scalpy is setup to trade only 3 days a week. My results:
Impressive. I shall leave the other demos going and try this myself next week.

:xm: :rocket:
Author:  adambent [ Mon Aug 22, 2022 10:21 am ]
Post subject:  Scalping New York

I am trying out SELL only trades. Looks promising for the moment ;)
Author:  Tebis [ Mon Aug 22, 2022 2:51 pm ]
Post subject:  Scalping New York

SteveHopwood » 04 Aug 2022, 17:03 wrote: Impressive. I shall leave the other demos going and try this myself next week.

:xm: :rocket:
Steve, what results did u get since your start ?

My first week just perfect; last 2 weeks where really bad .
I start tomorrow without XXXJPY pairs.
here the results since Aug. 2nd:
All times are UTC Page 29 of 31