Prop trading - est-ce une arnaque ou est-ce une bonne chose ? - page 14

 
Aleksey Vyazmikin:

Je pensais que vous aviez déjà pris le coup de main dans l'indicateur.

Non, je n'ai pas le cerveau pour ça...

 
prostotrader:

Non, je n'ai pas le cerveau pour ça...

On ne voit pas bien ce que cette agression passive a à voir avec...

 

Ajout du dernier prix au comptant pour que vous puissiez suivre vos achats

//+------------------------------------------------------------------+
//|                                                    SPOTvsFUT.mq5 |
//|                                     Copyright 2019, prostotrader |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, prostotrader"
#property link      "https://www.mql5.com"
#property version   "1.00"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_plots   2
//--- plot Label1
#property indicator_label1  "Input %"
#property indicator_type1   DRAW_LINE
#property indicator_color1  clrLime
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot Label2
#property indicator_label2  "Output %"
#property indicator_type2   DRAW_LINE
#property indicator_color2  clrAqua
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//---
#define  on_call -111
#define  YEAR    365
//---
input double StCB     = 7.5;    //Ставка ЦБ(%)
input double BBSpot   = 0.025;  //Брокер и Биржа СПОТ(%)
input double BrFut    = 0.24;   //Брокер ФОРТС(руб.)
input double BiFut    = 0.0066; //Биржа ФОРТС(%) 
input double BrExp    = 1.0;    //Брокер за эксп.(руб.) 
input double BiExp    = 2.0;    //Биржа за зксп.(руб.)
input double Div      = 0;      //Дивиденты(руб./акция)
input double NalogDiv = 13;     //Налог на дивиденты(%)
input double NalDepo  = 175;    //Комиссия депозитария (руб./мес.)
input long   NFut     = 100;    //Передп. кол-во фьючерсов к продаже
input int    aBars    = 30;     //Мин. Баров на графике  
input double pSpot    = 100;    //Цена СПОТ для вечернего мониторинга 
//---
struct MARKET_DATA
{
  int exp_day;
  double spot_ask;
  double spot_bid;
  double fut_ask;
  double fut_bid;
  double fut_lot;
  double go_sell;
  double go_buy;
};
//---
string spot_symbol;
int event_cnt;
MARKET_DATA ma_data;
double inBuff[], outBuff[];
bool spot_book, fut_book;

//+------------------------------------------------------------------+
//| Custom indicator 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);
}
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
  int t_bars = Bars(Symbol(), PERIOD_CURRENT);
  if(t_bars < (aBars + 2))
  {
    Alert("Не хватает баров на графике!");
    return(INIT_FAILED);
  }
  event_cnt = 0;
//---
  spot_symbol = GetSpot(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(Symbol());
  if(spot_book == false)
  {
    Alert("Не добавлен стакан фьючерса!");
    return(INIT_FAILED);
  }   
  IndicatorSetInteger(INDICATOR_DIGITS, 2);
  IndicatorSetString(INDICATOR_SHORTNAME, "SPOTvsFUT");
//---  
  SetIndexBuffer(0, inBuff, INDICATOR_DATA);
  PlotIndexSetDouble(0, PLOT_EMPTY_VALUE, EMPTY_VALUE);
  ArraySetAsSeries(inBuff, true); 
  
  SetIndexBuffer(1, outBuff, INDICATOR_DATA);
  PlotIndexSetDouble(1, PLOT_EMPTY_VALUE, EMPTY_VALUE);
  ArraySetAsSeries(outBuff, true);
  
    int window=ChartWindowFind(ChartID(),"SPOTvsFUT");
  ObjectCreate(ChartID(),"SPOTvsFUT_1",OBJ_LABEL,window,0,0);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_1",OBJPROP_YDISTANCE,15);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_1",OBJPROP_XDISTANCE,5);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_1",OBJPROP_COLOR,clrLime);
  ObjectSetString(ChartID(),"SPOTvsFUT_1",OBJPROP_TEXT,"Input: 0");  

  ObjectCreate(ChartID(),"SPOTvsFUT_2",OBJ_LABEL,window,0,0);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_2",OBJPROP_YDISTANCE,30);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_2",OBJPROP_XDISTANCE,5);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_2",OBJPROP_COLOR,clrAqua);
  ObjectSetString(ChartID(),"SPOTvsFUT_2",OBJPROP_TEXT,"Output: 0");
  
  ObjectCreate(ChartID(),"SPOTvsFUT_3",OBJ_LABEL,window,0,0);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_3",OBJPROP_YDISTANCE,45);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_3",OBJPROP_XDISTANCE,5);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_3",OBJPROP_COLOR,clrWhite);
  ObjectSetString(ChartID(),"SPOTvsFUT_3",OBJPROP_TEXT,"Delta: 0");
  
  ObjectCreate(ChartID(),"SPOTvsFUT_4",OBJ_LABEL,window,0,0);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_4",OBJPROP_YDISTANCE,60);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_4",OBJPROP_XDISTANCE,5);
  ObjectSetInteger(ChartID(),"SPOTvsFUT_4",OBJPROP_COLOR,clrWhite);
  ObjectSetString(ChartID(),"SPOTvsFUT_4",OBJPROP_TEXT,"Night Delta: 0");
//---  
  return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
// Custom indicator DeInit function                                  |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
  ObjectDelete(ChartID(),"SPOTvsFUT_1");
  ObjectDelete(ChartID(),"SPOTvsFUT_2");
  ObjectDelete(ChartID(),"SPOTvsFUT_3");
  ObjectDelete(ChartID(),"SPOTvsFUT_4");
  if(fut_book == true) MarketBookRelease(Symbol());
  if(spot_book == true) MarketBookRelease(spot_symbol);
  if(reason == REASON_INITFAILED)
  {
    Print("Индикатор удалён! Причина - ошибка инициализации.");
    string short_name = ChartIndicatorName(ChartID(), 1, 0);
    ChartIndicatorDelete(ChartID(), 1, short_name); 
  }
}
//+------------------------------------------------------------------+
//| Custom indicator Get expiration  function                        |
//+------------------------------------------------------------------+   
int GetExpiration(const string aSymbol)
{
  MqlDateTime ExpData, CurData;
  datetime expir_time = datetime(SymbolInfoInteger(aSymbol, SYMBOL_EXPIRATION_TIME));
  TimeToStruct(expir_time, ExpData);
  TimeTradeServer(CurData);
  if(ExpData.year != CurData.year)
  {
    return(YEAR * (ExpData.year - CurData.year) - CurData.day_of_year + ExpData.day_of_year);
  }
  else
  {
    return(ExpData.day_of_year - CurData.day_of_year);
  }
}
//+------------------------------------------------------------------+
// Custom indicator On book event function                           |
//+------------------------------------------------------------------+
void OnBookEvent(const string& symbol)
{
  if((symbol == Symbol()) || (symbol == spot_symbol))
  {
    ma_data.exp_day  = GetExpiration(Symbol());
    ma_data.fut_ask  = SymbolInfoDouble(Symbol(), SYMBOL_ASK);
    ma_data.fut_bid  = SymbolInfoDouble(Symbol(), SYMBOL_BID);
    ma_data.fut_lot  = SymbolInfoDouble(Symbol(), SYMBOL_TRADE_CONTRACT_SIZE);
    ma_data.go_sell  = SymbolInfoDouble(Symbol(), SYMBOL_MARGIN_INITIAL);
    ma_data.go_buy  = SymbolInfoDouble(Symbol(), SYMBOL_MARGIN_MAINTENANCE);
    ma_data.spot_ask = SymbolInfoDouble(spot_symbol, SYMBOL_ASK);
    ma_data.spot_bid = SymbolInfoDouble(spot_symbol, SYMBOL_BID);
//---    
    double price[]; 
    OnCalculate(event_cnt, event_cnt, on_call, price); 
  }
}
//+------------------------------------------------------------------+
// Custom indicator Calc In Value function                           |
//+------------------------------------------------------------------+
double CalcInValue()
{
  double depocomiss = NalDepo/(NFut * ma_data.fut_lot);
  double comiss = ma_data.spot_ask * ma_data.fut_lot * BBSpot/100 * 2 +
                  BrFut + BiFut * ma_data.fut_bid/100 + BrExp + BiExp;
  double divNalog = Div/100 * 13;
  double divWaite = 0;
  if(Div > 0) divWaite = ((Div - divNalog) * ma_data.fut_lot * 13/100/365 * 20);
  
  return(0);
}
//+------------------------------------------------------------------+
// Custom indicator Calc Out Value function                          |
//+------------------------------------------------------------------+
double CalcOutValue()
{
  double comiss = ma_data.spot_bid * ma_data.fut_lot * BBSpot/100 +
                   BrFut + BiFut * ma_data.fut_ask/100;
  return(0);

}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double &price[])
{
  if(prev_calculated == 0)
  {
    ArrayInitialize(inBuff, EMPTY_VALUE);
    ArrayInitialize(outBuff, EMPTY_VALUE);
    inBuff[1] = -50;
    outBuff[1] = 50;
  }  
//---  
  if(begin == on_call)
  {
    for(int i = aBars - 1; i > 0; i--)
    {
      inBuff[i] = inBuff[i - 1];
      outBuff[i] = outBuff[i - 1];
    }
    inBuff[0] = CalcInValue(); 
    outBuff[0] = CalcOutValue();
  }
  else
  {
    inBuff[0] = inBuff[1];
    outBuff[0] = outBuff[1];
  }
  inBuff[aBars] = EMPTY_VALUE;
  outBuff[aBars] = EMPTY_VALUE;
  ObjectSetString(ChartID(),"SPOTvsFUT_1",OBJPROP_TEXT,"Input: " + DoubleToString(inBuff[0], 2));
  ObjectSetString(ChartID(),"SPOTvsFUT_2",OBJPROP_TEXT,"Output: " + DoubleToString(outBuff[0], 2));
  ObjectSetString(ChartID(),"SPOTvsFUT_3",OBJPROP_TEXT,"Delta: " + DoubleToString(ma_data.fut_bid - (ma_data.spot_ask * ma_data.fut_lot), 0));
  ObjectSetString(ChartID(),"SPOTvsFUT_4",OBJPROP_TEXT,"Night Delta: " + DoubleToString(ma_data.fut_bid - (pSpot * ma_data.fut_lot), 0));
  ChartRedraw(ChartID());
//--- return value of prev_calculated for next call
  event_cnt = rates_total;
  return(rates_total);
}
//+------------------------------------------------------------------+
 
prostotrader:

Aujourd'hui, pour la Sberbank, il y a une situation classique qui consiste à prendre le spread, mais avec un petit risque.

D'après ce que j'ai compris, la même situation s'est produite aujourd'hui ? Hier, les futures ont également augmenté de 100+ pips après la fermeture du spot Sber.

Maintenant pour voir s'il était possible d'acheter plus d'actions autour du prix de clôture d'hier dès l'ouverture.

Ajouté :

Oui, vous auriez pu.

 

Le verre est bu avant l'ouverture du marché :


 
Revenons au sujet principal du fil de discussion : borsatrading est une arnaque de type forex.
En fait, ils ne fournissent aucun capital, ils réduisent simplement de 20 fois le montant de GO requis pour ouvrir des positions sur les contrats à terme du MEX (voir FAQ'Quel est le capital dont je dispose, comment l'examiner').
 
Sergey Lebedev:
Pour en revenir au sujet principal du fil de discussion : borsatrading est une arnaque de type forex.
En fait, ils ne fournissent pas de capital, ils réduisent simplement de 20 fois le montant de GO requis pour ouvrir des positions sur les contrats à terme du MEX (voir FAQ'Quel est le capital dont je dispose, comment l'examiner' ).

Vous vous rendez compte que vous vous contredisez en écrivant "ils ne fournissent aucun capital, ils réduisent simplement de 20 fois le nombre de GO" ? En substance, ils réduisent la pression sur les liquidités, qui, au lieu d'être gelées sous le GO lors des transactions, peuvent être mises à contribution dans d'autres instruments.

 

A propos, s'il y a des personnes intéressées qui veulent être capables de trader à partir de MT5 dans Kvek, je propose de coopérer et de commander ensemble une classe de trading à ces fins.

En général, j'ai déjà ouvert un poste, mais je ne dois pas encore choisir mes exécuteurs testamentaires, et ils ne veulent pas beaucoup d'argent, donc voici l'offre.

 
Aleksey Vyazmikin:

D'ailleurs, s'il y a des personnes intéressées qui veulent être en mesure de trader à partir de MT5 dans Kvek, je suggère que nous fassions équipe et commandions ensemble une classe de trading à cette fin.

Pourquoi cela devrait-il être si compliqué ? Cela fonctionne déjà très bien dans QuickKey. Vous pouvez aussi vous scalper, si vous le souhaitez. Et vous pouvez aussi fabriquer des automates. Ils sont assez rapides.
 
Aleksey Vyazmikin:

D'ailleurs, s'il y a des personnes intéressées qui veulent être en mesure de trader à partir de MT5 dans Kvek, je suggère que nous fassions équipe et commandions ensemble une classe de trading à cette fin.

Pourquoi cela devrait-il être si compliqué ? Cela fonctionne déjà très bien dans QuickKey. Vous pouvez aussi vous scalper, si vous le souhaitez. Et vous pouvez aussi fabriquer des automates. Ils sont assez rapides.
Raison: