recipe for night scalper

To add comments, please log in or register
Dua Yong Rew
5435
Dua Yong Rew  

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

- time filter

- max spread

- slippage

 

any more filter that i miss out? 

soubra2003
31838
soubra2003  
Dua Yong Rew:

from my study, a night scalper contains ...

any more filter that i miss out? 

News Filter
Marco vd Heijden
Moderator
8148
Marco vd Heijden  
Volumes
Dua Yong Rew
5435
Dua Yong Rew  
Marco vd Heijden:
Volumes
How to use this?
soubra2003
31838
soubra2003  
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
   );


 

Dua Yong Rew
5435
Dua Yong Rew  
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?
Marco vd Heijden
Moderator
8148
Marco vd Heijden  
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.
soubra2003
31838
soubra2003  
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
Dua Yong Rew
5435
Dua Yong Rew  
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?
Dua Yong Rew
5435
Dua Yong Rew  

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);

//---
  }
Dua Yong Rew
5435
Dua Yong Rew  

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);
  }
12
To add comments, please log in or register