recipe for night scalper

 

from my study, a night scalper contains the most common filter

- time filter

- max spread

- slippage

 

any more filter that i miss out? 

 
Dua Yong Rew:

from my study, a night scalper contains ...

any more filter that i miss out? 

News Filter
 
Volumes
 
Marco vd Heijden:
Volumes
How to use this?
 
Marco vd Heijden:
Volumes
Dua Yong Rew:
How to use this?

I believe it has greater filter than News Filter as well

to access it you can use:

iVolume();

...

long  iVolume(
   string           symbol,          // symbol
   int              timeframe,       // timeframe
   int              shift            // shift
   );


 

 
Mohammad Soubra:

I believe it has greater filter than News Filter as well

to access it you can use:

iVolume();

...

long  iVolume(
   string           symbol,          // symbol
   int              timeframe,       // timeframe
   int              shift            // shift
   );


 

Enter when low volume?
 
Dua Yong Rew:
How to use this?
You analyze all volumes and pick the most active pairs.

Unless you want to scalp on a dead symbol that isn't moving...

It's a symphony of elements.
 
Marco vd Heijden:
You analyze all volumes and pick the most active pairs.

Unless you want to scalp on a dead symbol that isn't moving...

It's a symphony of elements.
Also, depends on the strategy itself
 
Marco vd Heijden:
You analyze all volumes and pick the most active pairs.

Unless you want to scalp on a dead symbol that isn't moving...

It's a symphony of elements.
any sample code to share?
 

Tackle slippage and max spread

please let me know if it can be further be enhanced 

extern   int         MaxSpread   = 10;             // Max Spread (Points)
extern   int         Slippage    = 5;              // Slippage
//+------------------------------------------------------------------+
//| Trade Open                                                       |
//+------------------------------------------------------------------+
int TradeOpen(ENUM_ORDER_TYPE Type, double Lots, double StopLoss, double TakeProfit)
  {
//---

   if(AccountFreeMarginCheck(_Symbol, Type, Lots) <= 0 || GetLastError() == 134) return(0);

   int   Ticket = 0,
         Spread = (int)MarketInfo(_Symbol, MODE_SPREAD);

   if(Spread <= MaxSpread)
   {
      Ticket = OrderSend(_Symbol, Type, Lots, (Type == OP_BUY) ? Ask : Bid, Slippage, StopLoss, TakeProfit, eName, MagicNum, 0, (Type == OP_BUY) ? Blue : Red);

      if(Ticket < 0)
      {
         Print("Error in OrderSend : ", GetLastError());
      }
      else
      {
         Sleep(800);
      }
   }

   return(Ticket);

//---
  }
 

tackle check time

extern   int         sHour       = 22;             // Start Hour
extern   int         rHour       = 3;              // Run Hour
extern   bool        TradeFri    = true;           // Trade Friday
//+------------------------------------------------------------------+
//| Check Time                                                       |
//+------------------------------------------------------------------+
bool CheckTime()
  {
//----

   int   eHour = sHour + rHour;

   if(!TradeFri)
   {
      if(DayOfWeek() == 5)
      {
         if(Hour() >= sHour)
         {
            return(false);
         }
      }

      if(DayOfWeek() == 1)
      {
         if(Hour() >= 0 && Hour() <= eHour - 23)
         {
            return(false);
         }
      }
   }

   if(eHour < 24)
   {
      if(Hour() >= sHour && Hour() <= eHour)
      {
         return(true);
      }
   }

   if(eHour > 23)
   {
      if((Hour() >= sHour && Hour() <= 23) || (Hour() >= 0 && Hour() <= eHour - 23))
      {
         return(true);
      }
   }

//----
   return(false);
  }
Reason: