Basato sulla strategia "Div hunter".

 

Ho pensato che quando il trading su SPOT viene interrotto, questo può essere utilizzato abbastanza

strategia di rischio (Fut Gap). Il suo significato è che non compriamo azioni , ma vendiamo solo futures

con il Gap impostato da noi.

Quando le azioni vengono negoziate, calcoliamo il delta medio tra i future e le azioni e quando

la negoziazione di azioni è terminata, effettuiamo un ordine (ordini) per la vendita di futures (delta calcolato + il nostro Gap).

E al mattino vendiamo futures

(la domanda è come vendere se la posizione è abbastanza grande?).


 //+------------------------------------------------------------------+
//|                                                      Fut_gap.mq5 |
//|                                     Copyright 2019, prostotrader |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, prostotrader"
#property link        "https://www.mql5.com"
#property version    "1.00"
//---
#include   "AutoMagic.mqh"
//--
input long PrGap        = 100 ;         //Гап вверх(пункты)
input string DeltaStart = "10:00:00" ; //Время начала расчета дельты
input string DeltaEnd   = "18:38:00" ; //Время конца расчета дельты
input string ClirStart  = "14:00:00" ; //Время начала дневного клиринга
input string ClirEnd    = "14:05:00" ; //Время конца клиринга
input string OrderStart = "19:05:00" ; //Время начала установки ордера
input string OrderEnd   = "23:43:00" ; //Время конца установки ордера
input long   PosMax     = 100 ;         //Максимальное кол-во контрактов
input long   PosEnter   = 5 ;           //Контрактов в ордере
//--- Variables
string fut_symbol, spot_symbol;
bool fut_book, spot_book;
enum POS_STATE
{
  POS_UNKNOWN = - 1 ,
  POS_NONE    = 0 ,
  POS_LONG    = 1 ,
  POS_SHORT   = 2
};
enum TIME_STATE
{
  TIME_UNKNOWN     = - 1 ,
  TIME_DELTA       = 0 ,
  TIME_CLIRING     = 1 , 
  TIME_ORDER       = 2 ,
  TIME_OUT_SESSION = 3
};
enum ENUM_ORD_STATE
{
  ORD_NO_STATE  = 0 ,
  ORD_DO_SET    = 1 ,
  ORD_DO_MODIFY = 2 ,
  ORD_WORK      = 3 ,
  ORD_DO_CANCEL = 4
};
struct EXP_DATA
{
   double contr_size;
   ulong delta_cnt;
   double fut_buy;
   double spot_sell;
   double spot_last;
   long contr_cnt;
   double delta_midle; 
   int spot_digits;
  TIME_STATE time_state;
   ulong st_delta_value;
   ulong end_delta_value;
   ulong st_clir_value;
   ulong end_clir_value;
   ulong st_order_value;
   ulong end_order_value;
  POS_STATE pos_state;
   double step_price;
   ulong ticket;
   ulong req_id;
   ulong magic;
  ENUM_ORD_STATE ord_state;
};
EXP_DATA exp_data;
//+------------------------------------------------------------------+
//| Expert Set Time values function                                  |
//+------------------------------------------------------------------+
ulong SetTimeValue( const string in_str)
{
   int str_size = StringLen (in_str);
   if (str_size == 8 )
  {
     int k = StringFind (in_str, ":" , 2 );
     if (k == 2 )
    {
       string s_hour = StringSubstr (in_str, 0 , k);
      k = StringFind (in_str, ":" , 5 );
       if (k == 5 )
      {
         string s_min = StringSubstr (in_str, 3 , k- 3 );
         string s_sec = StringSubstr (in_str, 6 , str_size - k - 1 );
         ulong t_sec = ulong ( StringToInteger (s_sec));
         ulong t_min = ulong ( StringToInteger (s_min)) * 60 ;
         ulong t_hour = ulong ( StringToInteger (s_hour)) * 3600 ;
         return (t_hour + t_min + t_sec);
      }
    }
  }
   return ( 0 );
}
//+------------------------------------------------------------------+
//| Expert Get Spot name function                                    |
//+------------------------------------------------------------------+
string GetSpot( const string fut_name)
{
   string Spot = "" ; 
   if (fut_name != "" )
  {
     int str_tire = StringFind (fut_name, "-" );
     if (str_tire > 0 )
    {
      Spot = StringSubstr (fut_name, 0 , str_tire);
       if (Spot == "GAZR" ) Spot = "GAZP" ; else
       if (Spot == "SBRF" ) Spot = "SBER" ; else
       if (Spot == "SBPR" ) Spot = "SBERP" ; else
       if (Spot == "TRNF" ) Spot = "TRNFP" ; else
       if (Spot == "NOTK" ) Spot = "NVTK" ; else
       if (Spot == "MTSI" ) Spot = "MTSS" ; else
       if (Spot == "GMKR" ) Spot = "GMKN" ; else
       if (Spot == "SNGR" ) Spot = "SNGS" ; else
       if (Spot == "Eu" )   Spot = "EURRUB_TOD" ; else
       if (Spot == "Si" )   Spot = "USDRUB_TOD" ; else
       if (Spot == "SNGP" ) Spot = "SNGSP" ;
    }
  }  
   return (Spot);
}
//+------------------------------------------------------------------+
//| Expert Chek position function                                    |
//+------------------------------------------------------------------+
POS_STATE CheckPosState()
{
  exp_data.contr_cnt = 0 ;
   if ( PositionSelect (fut_symbol))
  {
    exp_data.contr_cnt =   long ( PositionGetDouble ( POSITION_VOLUME ));
     ENUM_POSITION_TYPE pos_type = ENUM_POSITION_TYPE ( PositionGetInteger ( POSITION_TYPE ));
     switch (pos_type)
    {
       case POSITION_TYPE_BUY :
         return (POS_LONG);
       break ;
       case POSITION_TYPE_SELL :
         return (POS_SHORT);
       break ;
    }
  }
   else return (POS_NONE);
   return (POS_UNKNOWN);
}
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit ()
{
  fut_symbol = Symbol ();
  spot_symbol = GetSpot(fut_symbol);
   if (spot_symbol == "" )
  {
     Alert ( "Не получено имя СПОТа!" );
     return ( INIT_FAILED );
  }
   else
  {
     if ( SymbolSelect (spot_symbol, true ) == false )
    {
       Alert ( "Нет смвола с именем " + spot_symbol + "!" );
       return ( INIT_FAILED );
    }
     else
    {
      spot_book = MarketBookAdd (spot_symbol);
       if (spot_book == false )
      {
         Alert ( "Не добавлен стакан СПОТа!" );
         return ( INIT_FAILED );
      }
    }
  } 
  fut_book = MarketBookAdd (fut_symbol);
   if (fut_book == false )
  {
     Alert ( "Не добавлен стакан фьючерса!" );
     return ( INIT_FAILED );
  }
//---
  exp_data.pos_state = CheckPosState();  
  exp_data.delta_cnt = 0 ;
  exp_data.fut_buy = 0 ;
 // exp_data.fut_sell = 0;
 // exp_data.spot_buy = 0;
  exp_data.spot_sell = 0 ;
  exp_data.spot_digits = int ( SymbolInfoInteger (spot_symbol, SYMBOL_DIGITS ));
  exp_data.spot_last = SymbolInfoDouble (spot_symbol, SYMBOL_LAST );
  exp_data.delta_midle = 0 ;
  exp_data.step_price = SymbolInfoDouble (fut_symbol, SYMBOL_TRADE_TICK_SIZE );
  exp_data.contr_size = SymbolInfoDouble (fut_symbol, SYMBOL_TRADE_CONTRACT_SIZE );
  exp_data.st_delta_value = SetTimeValue(DeltaStart);
  exp_data.end_delta_value = SetTimeValue(DeltaEnd);
  exp_data.st_clir_value = SetTimeValue(ClirStart);
  exp_data.end_clir_value = SetTimeValue(ClirEnd);
  exp_data.st_order_value = SetTimeValue(OrderStart);
  exp_data.end_order_value = SetTimeValue(OrderEnd);
//---
   if ((exp_data.st_delta_value > 0 ) && (exp_data.end_delta_value > 0 ) &&
     (exp_data.st_clir_value > 0 ) && (exp_data.end_clir_value > 0 ) &&
     (exp_data.st_order_value > 0 ) && (exp_data.end_order_value > 0 ))
  {
    exp_data.magic = GetMagic(fut_symbol);
     if (exp_data.magic == 0 ) 
    {
       Alert ( "Не установлен магик!" );
       return ( INIT_FAILED );
    }
     return ( INIT_SUCCEEDED );
  }
   else return ( INIT_FAILED );
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit ( const int reason)
{
   if (fut_book == true ) MarketBookRelease (fut_symbol);
   if (spot_book == true ) MarketBookRelease (spot_symbol);
   if (reason == REASON_INITFAILED )
  {
     Print ( "Эксперт удалён! Причина - ошибка инициализации." );
     ExpertRemove ();
  }
}
//+------------------------------------------------------------------+
//| Expert Check Trade Time function                                 |
//+------------------------------------------------------------------+
TIME_STATE CheckTradeTime()
{
   MqlDateTime dt_str;
   TimeTradeServer (dt_str);
   if (dt_str.year > 0 )
  {
     ulong cur_time = ulong (dt_str.sec) + ulong (dt_str.min * 60 ) + ulong (dt_str.hour * 3600 );
     if ((cur_time >= exp_data.st_delta_value) && (cur_time <= exp_data.end_delta_value))
    {
       return (TIME_DELTA);
    }
     else
    {
       if ((cur_time >= exp_data.st_clir_value) && (cur_time <= exp_data.end_clir_value))
      {
         return (TIME_CLIRING);
      }
       else
      {
         if ((cur_time >= exp_data.st_order_value) && (cur_time <= exp_data.end_order_value))
        {
           return (TIME_ORDER);
        }
         else return (TIME_OUT_SESSION);
      }
    }
  }
   return (TIME_UNKNOWN);
}
//+------------------------------------------------------------------+
//| Expert Points to price function                                  |
//+------------------------------------------------------------------+
double PointsToPrice( const long a_points)
{
   double a_price = ( double (a_points) * Point () ) / exp_data.step_price;
   if (a_points < 0 )
  {
    a_price = MathFloor (a_price) * exp_data.step_price;
  }
   else
  {
    a_price = MathCeil (a_price) * exp_data.step_price;
  }
   return ( NormalizeDouble (a_price, Digits ()));
}
//+------------------------------------------------------------------+
//| Expert Set Delta Value function                                  |
//+------------------------------------------------------------------+
void SetDeltaValue()
{
  exp_data.fut_buy = SymbolInfoDouble (fut_symbol, SYMBOL_BID );
  exp_data.spot_sell = SymbolInfoDouble (spot_symbol, SYMBOL_ASK );
   if ((exp_data.fut_buy > 0 ) && (exp_data.spot_sell > 0 ))
  {
     double cur_delta = (exp_data.fut_buy - exp_data.spot_sell * exp_data.contr_size);
     double tmp_delta = exp_data.delta_midle * exp_data.delta_cnt;
    exp_data.delta_cnt++;
    exp_data.delta_midle = (tmp_delta + cur_delta)/exp_data.delta_cnt;
  }
}
//+------------------------------------------------------------------+
//| Expert Place Order function                                      |
//+------------------------------------------------------------------+
bool PlaceOrder( const long volume)
{
   if ((exp_data.delta_cnt > 0 ) && (exp_data.delta_midle > 0 ))
  {
    exp_data.spot_last = SymbolInfoDouble (spot_symbol, SYMBOL_LAST ); 
     long delta = long (exp_data.delta_midle/Point());
     double price = exp_data.spot_last * exp_data.contr_size + PointsToPrice(delta + PrGap); 
     double max_price = SymbolInfoDouble (fut_symbol, SYMBOL_SESSION_PRICE_LIMIT_MAX );
     double min_price = SymbolInfoDouble (fut_symbol, SYMBOL_SESSION_PRICE_LIMIT_MIN );
     if ((price >= min_price) && (price <= max_price))
    {
       MqlTradeRequest request = { 0 };
       MqlTradeResult   result  = { 0 };
      exp_data.ticket = 0 ;
      exp_data.req_id = 0 ;
      request.action = TRADE_ACTION_PENDING ;
      request.magic  = exp_data.magic;
      request.symbol = fut_symbol;
      request.volume = double (volume);
      request.price  = price;
      request.type = ORDER_TYPE_SELL_LIMIT ;
      request.comment = "Отложенный ордер..." ;      
      request.type_filling = ORDER_FILLING_RETURN ;
      request.type_time = ORDER_TIME_DAY ;
//--- Send order
       if ( OrderSendAsync (request, result) == true )
      {
         if ((result.retcode == TRADE_RETCODE_PLACED ) || (result.retcode == TRADE_RETCODE_DONE )) 
        {
          exp_data.req_id = result.request_id;
           if (exp_data.req_id > 0 ) exp_data.ord_state = ORD_DO_SET;
        }
         else
        {
           Print (result.retcode, "; PleceOrder: Ордер не установлен!" );
        }
      }
       else
      {
         Print (result.retcode, "; PlaceOrder: Ордер не отослан!" );
      }
    }
  }
   return ( false );
}
//+------------------------------------------------------------------+
//| Expert Set Order function                                         |
//+------------------------------------------------------------------+
void SetOrder( const double o_vol, const bool buy_sell)
{
   MqlTradeRequest request = { 0 };
   MqlTradeResult   result  = { 0 };
  exp_data.req_id = 0 ;
  exp_data.ticket = 0 ;
//--- Fill structure
  request.magic = exp_data.magic;
  request.symbol = fut_symbol;
  request.volume = o_vol; 
  request.type_filling = ORDER_FILLING_IOC ;
  request.type_time = ORDER_TIME_DAY ;
  request.action = TRADE_ACTION_DEAL ;
  request.comment = "Рыночный ордер..." ;
   if (buy_sell == true )
  {
    request.type = ORDER_TYPE_BUY ;
  }
   else
  {
    request.type = ORDER_TYPE_SELL ;
  }
//--- Send order
   if ( OrderSendAsync (request, result))
  {
     if ((result.retcode == TRADE_RETCODE_PLACED ) || (result.retcode == TRADE_RETCODE_DONE ))
    {
      exp_data.req_id = result.request_id;
       if (exp_data.req_id > 0 ) exp_data.ord_state = ORD_DO_SET;  
    }
     else
    {
       Print (result.retcode, "; SetOrder: Ордер не установлен!" );
    }
  }
   else
  {
     Print (result.retcode, "; SetOrder: Ордер не отправлен!" );
  }
}
//+------------------------------------------------------------------+
//| Expert Close position function                                   |
//+------------------------------------------------------------------+
void RemoveOrder()
{
  exp_data.req_id = 0 ;
   MqlTradeRequest request = { 0 };
   MqlTradeResult   result  = { 0 };
  request.action = TRADE_ACTION_REMOVE ;
  request.order = exp_data.ticket;
   if ( OrderSendAsync (request, result) == true )
  {
     if ((result.retcode == TRADE_RETCODE_PLACED ) || (result.retcode == TRADE_RETCODE_DONE ))
    { 
      exp_data.req_id = result.request_id;
       if (exp_data.req_id > 0 ) exp_data.ord_state = ORD_DO_CANCEL;
    }
  }
   else
  {
     Print (result.retcode, "; RemoveOrder: Ордер не отослан!" );
  }
}
//+------------------------------------------------------------------+
//| Expert Close position function                                   |
//+------------------------------------------------------------------+
void ClosePosition()
{
   if ( PositionSelect (fut_symbol))
  {
     double a_vol = PositionGetDouble ( POSITION_VOLUME );
     ENUM_POSITION_TYPE pos_type = ENUM_POSITION_TYPE ( PositionGetInteger ( POSITION_TYPE ));
     switch (pos_type)
    {
       case POSITION_TYPE_BUY :
        SetOrder(a_vol, false ); //Sell order
       break ;
       case POSITION_TYPE_SELL :
        SetOrder(a_vol, true );   //Buy order
       break ;     
    }
  }
}
//+------------------------------------------------------------------+
//| Expert Book Event function                                       |
//+------------------------------------------------------------------+
void OnBookEvent ( const string &symbol)
{
   if ((symbol == fut_symbol) || (symbol == spot_symbol))
  {
    exp_data.pos_state = CheckPosState();
     if (exp_data.ord_state == ORD_NO_STATE)
    {
       long a_vol;
       switch (CheckTradeTime())
      {
        case TIME_OUT_SESSION:
          exp_data.delta_midle = 0;
          exp_data.delta_cnt = 0;
        break;
         case TIME_DELTA:
           switch (exp_data.pos_state)
          {
             case POS_UNKNOWN:
             break ;
             case POS_NONE:
              SetDeltaValue();
             break ;
             case POS_LONG:       //Не верно открыта позиция
              ClosePosition();
             break ;
             case POS_SHORT:
              ClosePosition();   //Сразу закрывать позицию (10:00:00)??????? Всю или частями??????????
             break ;
          }
         break ;
         case TIME_ORDER:
           switch (exp_data.pos_state)
          {
             case POS_UNKNOWN:
             break ;
             case POS_NONE:
              PlaceOrder(PosEnter);
             break ;
             case POS_LONG:
              ClosePosition(); //Не верно открыта позиция
             break ;
             case POS_SHORT:   //Добавление позиции
              a_vol = PosMax - exp_data.contr_cnt;
               if (a_vol > 0 )
              {
                 if (a_vol > PosEnter) a_vol = PosEnter; 
                PlaceOrder(a_vol);
              }  
             break ;
          }
         break ;
      }
    }
     else
    {
       switch (exp_data.ord_state)
      {
         case ORD_DO_SET:
           //TODO
         break ;
         case ORD_DO_CANCEL:
           //TODO
         break ;
         case ORD_WORK:
           //TODO
         break ;
      } 
    }
  }
}
//+------------------------------------------------------------------+
//| TradeTransaction function                                        |
//+------------------------------------------------------------------+
void OnTradeTransaction ( const MqlTradeTransaction & trans,
                         const MqlTradeRequest & request,
                         const MqlTradeResult & result)
{
   switch (trans.type)
  {
     case TRADE_TRANSACTION_REQUEST :
       if ((exp_data.req_id > 0 ) && (result.request_id == exp_data.req_id))
      {
         if (result.order > 0 )
        {
          exp_data.ticket = result.order;
          exp_data.req_id = 0 ;
        }
         else
        {
          exp_data.ticket = 0 ;
          exp_data.req_id = 0 ;
          exp_data.ord_state = ORD_NO_STATE;
        }
      }
     break ;
     case TRADE_TRANSACTION_HISTORY_ADD :
       if ((exp_data.ticket > 0 ) && (trans.order == exp_data.ticket))
      {
        exp_data.ticket = 0 ;
        exp_data.req_id = 0 ;
        exp_data.ord_state = ORD_NO_STATE;
      }
     break ;
     case TRADE_TRANSACTION_ORDER_UPDATE :
       switch (trans.order_state)
      {
         case ORDER_STATE_PLACED :
           if ((exp_data.ticket > 0 ) && (trans.order == exp_data.ticket))
          {
             switch (exp_data.ord_state)
            {
               case ORD_DO_SET:
                exp_data.ord_state = ORD_WORK;
               break ;
            }
          }
         break ;
      }
     break ;  
  }   
}
//+------------------------------------------------------------------+

La demo non funzionerà!

Aggiunto

 //+------------------------------------------------------------------+
//|                                                    AutoMagic.mqh |
//|                                 Copyright 2017-2018 prostotrader |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
//version   "1.01
ulong symb_magic;
//-------------------------------------------------------------------+
// Split string function                                             |
//+------------------------------------------------------------------+
string SplitString( const string a_str, ulong &a_month, ulong &a_year)
  {
   int str_size= StringLen (a_str);
   int str_tire= StringFind (a_str, "-" );
   int str_tochka= StringFind (a_str, "." , str_tire);
   if ((str_tire> 0 ) && (str_tochka> 0 ) &&(str_size > 0 ))
     {
      a_month= ulong ( StringToInteger ( StringSubstr (a_str,str_tire+ 1 ,str_tochka-str_tire- 1 )));
      a_year = ulong ( StringToInteger ( StringSubstr (a_str,str_tochka+ 1 ,str_size-str_tochka- 1 )));
       if ((a_month > 0 ) && (a_year > 0 )) return ( StringSubstr (a_str, 0 , str_tire));
     }
   return ( "" );
  }
//-------------------------------------------------------------------+
// Get Magic function                                                |
//+------------------------------------------------------------------+
ulong GetMagic( const string a_symbol)
{
//--- Get ChartID
  symb_magic = 0 ;
   if ( SymbolSelect ( Symbol (), true ) == false )
  {
     Print ( __FUNCTION__ , ": Нет такого символа!" );
     return ( 0 );
  }
   ulong month = 0 ;
   ulong year = 0 ;
   string new_str = SplitString(a_symbol,month,year);
   if ( StringLen (new_str)> 0 )
  {
     uchar char_array[];
     int result= StringToCharArray (new_str,char_array, 0 , WHOLE_ARRAY , CP_ACP );
     if (result> 0 )
   {
     ulong value;
     for ( int i = 0 ; i < result - 1 ; i++)
     {
       value= ulong (char_array[i]);
       value<<=( 56 -(i* 8 ));
       symb_magic += value;
     }
     month<<= 24 ;
     symb_magic += month;
     year<<= 16 ;
     symb_magic += year;
     return (symb_magic);
   }
 }
   return ( 0 ); 
}
//-------------------------------------------------------------------+
// Is my magic function                                              |
//+------------------------------------------------------------------+
bool IsMyMagic( const ulong m_magic)
{
   if (m_magic > 0 )
  {
     ulong stored_magic=symb_magic;
    stored_magic>>= 16 ;
     ulong in_magic = m_magic;
    in_magic>>= 16 ;
     if (in_magic == stored_magic) return ( true );
  }  
   return ( false );
}
//-------------------------------------------------------------------+
// Get stored magic function                                         |
//+------------------------------------------------------------------+
ulong GetStoredMagic()
{
   if (symb_magic > 0 ) return (symb_magic);
   return ( 0 );  
}
//+------------------------------------------------------------------+
 

A proposito, USDRUB_TOM potrebbe essere un indicatore per SBER e VTB .

Devo pensare a come "avvitarlo" nel mio EA...

Aggiunto

Nessuno ha qualche idea su come uscire da una posizione con un grande volume?

 
Basta aggiungere una funzione
void CheckOrderState()
E decidere come chiudere una grande posizione....
File:
Fut_gap.mq5  46 kb
 
prostotrader:

....

Aggiunto

Nessuno ha qualche idea su come uscire dalla posizione con un alto volume?

In piccole porzioni. Impostare un limite sul prezzo sopra/sotto il quale chiudere la posizione per porzioni. Per esempio, si prende una posizione per comprare. Hai impostato un limite per chiudere la posizione al prezzo superiore a 100 RUB. E se il prezzo è superiore a 100 si vende per porzioni o per limite o per prezzo di mercato.

 
prostotrader:

Mi è venuto in mente che con l'arresto del commercio di SPOT, questo potrebbe essere usato in un modo abbastanza

strategia rischiosa (Fut Gap). L'idea è che non compriamo azioni, ma vendiamo solo futures

con il Gap che abbiamo creato.

Quando l'azione viene scambiata, calcoliamo il delta medio tra i futures e l'azione, e quando

l'azione è finita, impostiamo l'ordine o gli ordini per vendere i futures (il delta calcolato + il nostro Gap).

E al mattino vendiamo i futures.

(La questione è come vendere se la posizione è abbastanza grande).


Non funziona sulla demo!

Aggiunto



E se vendessimo e il mercato salisse ancora?

Per quanto riguarda la chiusura - dipende dal volume, se è grande, lo rompo in lotti di 5-10 e lo metto nello spread - funziona bene in un mercato veloce, ma il processo non è automatizzato per me.

 

Qualcuno scriverà una funzione di uscita per la posizione?

//+------------------------------------------------------------------+
//| Expert Exit From Position function                               |
//+------------------------------------------------------------------+
void ExitFromPosition()
{
  double pos_price = GetPositionPrice(fut_symbol);
  if(pos_price > 0)
  {
    double cur_price = SymbolInfoDouble(fut_symbol, SYMBOL_ASK);
    //TODO???
  }  
}
File:
Fut_gap.mq5  50 kb
 
Aleksey Vyazmikin:

E se tu vendessi e il mercato salisse ancora?

Stabilisci la tua "avidità" :)

input long PrGap        = 100;        //Гап вверх(пункты)
 
prostotrader:

Stabilisci la tua "avidità" :)

Non capisco - abbiamo aperto uno short, ma il mercato ha continuato a spingere verso l'alto - non potevamo chiuderlo nel primo minuto e avremmo usato degli stop - non capisco.

prostotrader:

Qualcuno scriverà una funzione per uscire da una posizione?

E come si decide di uscire? Posso darvi una lezione su come lavorare con le posizioni - aprire/chiudere/modificare...

 
Aleksey Vyazmikin:

Non capisco - abbiamo aperto il breve, ma il mercato continua a premere verso l'alto - non chiudere al primo minuto, sarà cablato con fermate - non capisco.


Non capisco.

Nel primo post c'è scritto:

"Mi è venuto in mente che quando si fermano gli scambi di SPOT, si potrebbe usare questo in un modo abbastanza

strategiarischiosa(Fut Gap)"

 
prostotrader:

Dovete leggere attentamente.

Il primo post dice:

"Mi è venuto in mente che quando si ferma il trading su SPOT si potrebbe usare questo in un modo abbastanza

strategiarischiosa(Fut Gap)"

La scrittura dovrebbe essere informativa, non ho mai capito nulla della sostanza.

 
Aleksey Vyazmikin:

Devi scrivere in modo informativo, non ho ancora capito il succo del discorso.

Dammi il tuo numero di carta, forse posso trasferirti dei soldi....

Beh, seriamente, il punto è questo.

Dopo che il trading azionario si ferma, i futures continuano a scambiare - SPECULATAMENTE,

perché il prezzo dei futures dipende dal prezzo delle azioni. Il giorno dopo il titolo può scendere o salire (50/50), MA!

Il delta tra i futures e l'azione di ieri, è maggiore del delta di oggi, da cui i nostri rischi (50 - qualche %).

Il prossimo... Vogliamo vendere i futures molto più in alto di quanto abbiano scambiato prima della chiusura delle azioni,

quindi i nostri rischi = (50 - qualche % sul delta - qualche % sul Gap che abbiamo fissato).

È chiaro ora?