[Archive] Learn how to make money villagers! - page 841

 

I suggest trying this one in this template I think it will work, but it will take me a lot of time, can anyone help?)

That was another owl's code.

I don't know what I'm doing here :D but it's not right... I've got to put the terms in there :D Anyway, I've got a blank

// Параметры торговли для H1 EURUSD
extern double TakeProfit   = 30;


extern int ZigAndZag       = 6;
extern int RISK            = 12;

// Параметры MM
extern double Slippage     = 30;
extern bool PropotinalLots = false; // Реинвестирование
extern double MinDepo      = 100;   // Минимальный депозит
extern double FixedLots    = 0.01;  // Фиксированный размер ордера
extern double PercentLots  = 10;    // Процент реинвестирования

// Идентификация эксперта
extern string NameEA       = "MachineTool";
extern int MAGICNUM        = 777;

double Lots;
double Tprof;
bool Buy = false, Sell = false;
static int TimeBar = 0;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {return(0);}

//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {return(0);}

//+------------------------------------------------------------------+
//|  Получение сигналов на покупку и продажу                         |
//+------------------------------------------------------------------+
void Indicators()
   {


// double TpUp = NormalizeDouble (iCustom(NULL, 0, "NRTR_Rosh_v2eAlert_mtf",3,0),Digits); //  TP_Buy
// double TpDn = NormalizeDouble (iCustom(NULL, 0, "NRTR_Rosh_v2eAlert_mtf",4,0),Digits); //  TP_Buy

double Up = NormalizeDouble (iCustom(NULL, 0, "ZigAndZag(1)",5,0),Digits); //  Buy
double Dn = NormalizeDouble (iCustom(NULL, 0, "ZigAndZag(1)",6,0),Digits); //  Sell
double Closse = NormalizeDouble (iCustom(NULL, 0, "ZigAndZag(1)",4,0),Digits); //  Close

double TimeBar = (TimeCurrent()-Time[0])/60; // время в минутах с открытия свечи

if ((TimeBar >= TimeBarOpen) && (Up != 0))  double NewBuy = 1; else NewBuy = 0; // условие BUY
if ((TimeBar >= TimeBarOpen) && (Dn != 0))  double NewSell = 1; else NewSell = 0; // условие SELL


RefreshRates ();

   }

//+------------------------------------------------------------------+
//|  Вывод предупреждения об отправке ордера                         |
//+------------------------------------------------------------------+
void prtAlert(string TimeBarOpen = "")
  {
      Print(TimeBarOpen);
      Alert(TimeBarOpen);
  }

//+------------------------------------------------------------------+
//|  Расчет размера ордера                                           |
//+------------------------------------------------------------------+
void LotsSize()
   {
      Lots = FixedLots;
      if (PropotinalLots) Lots = MathCeil(AccountFreeMargin() / 10000 * PercentLots) / 10;
      if (Lots > 10000) Lots = 10000;
   }

//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   // Проверка истории
   if(Bars < ZigAndZag)
     {
       Print("Not enough bars for this strategy - ", NameEA);
       return(-1);
     }
   // Расчет значений индикатора
   Indicators();

   // Расчет желаемого размера ордера
   LotsSize();

   int totalOrders = OrdersTotal();
   int numPos = 0;

   for(int i = 0; i < totalOrders; i++)
     {
       OrderSelect(i, SELECT_BY_POS);
       if(OrderSymbol() == Symbol() && OrderMagicNumber() == MAGICNUM)
         {
           // Проверяем покупку
           if(OrderType() == OP_BUY)
             {
               // Закрываем при развороте
               if (Sell)
               {
                  OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Blue);
               }
               else

                 {
                     {
                     }
                 }

             }
           else
             // Проверяем продажу
             {
               // Закрываем при развороте
               if (Buy)
               {
                  OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Red);
               }
               else

                 {
                     {
                     }
                 }
             }
         }
     }

     {
       // Если размер депозита устраивает
       if(AccountFreeMargin() < MinDepo)
         {
           Print("Not enough money to trade ", Lots, " lots. Strategy:", NameEA);
           return(0);
         }
       // Если есть сигнал на покупку
       if (Buy)
         {
           Tprof = Bid + TakeProfit * Point;
           TimeBar = Time[0];
            OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, Tprof, NameEA + TimeBar(),
                     MAGICNUM, 0, Green);
           prtAlert("Buying");
         }
       // Если есть сигнал на продажу
       if (Sell)
         {
           Tprof = Ask - TakeProfit * Point;
           TimeBar = Time[0];
            OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, Tprof, NameEA + TimeBar(),
                     MAGICNUM, 0, Red);
           prtAlert("Selling");
         }
     }

   return(0);
  }
 
BeerGod:
The system works, everyone can understand it differently ...
Have you tested it on the demo or only in the tester?
 
khorosh:
Did you check it on demo or only in tester?
On cents real... ;)
BeerGod:

Started in April, bot, real... unfortunately a cent

P.S. At one point in time only one position is open, now everything is closed.
 
BeerGod:

You still haven't answered my question:

MaxZ:
BeerGod:

Who understands, understands ... more details here

turkey first from the top http://www.invest74.ru/trade_systems2.php

there was a discussion but it was lost here https://www.forex-tsd.com/manual-trading-systems/19463-1-minutes-incredible-scalper-system.html

What's the connection between the second link and the first with the third?
 
MaxZ:
On the cents real... ;)


Hi

Where can I get a bot?

 
stace:


Hi

Where can I get a bot?

Hi.

The last four pages contain all the material. You can't get a ready-made "bot", but you can try to build one yourself. There is an indicator (ZigZag with signal buffers) that makes profit (today), but you have to learn how to cook this indicator with its signals in order to make a profit! :))) Money doesn't fall out of the sky... And there is no grail, DTs will help to break all myths and legends! :DD

 

All right, my coder will write it, I'll test it later.

Martin can be brought in.

 
stace:

All right, my coder will write it, I'll test it later.

Martin can be brought in.


Isn't it fashionable among "villagers" - like, my hairdresser, my stylist, my dentist...my coder? :-)
 
Roman.:

Isn't it fashionable for "villagers" nowadays - like, my hairdresser, my stylist, my dentist... my coder? :-)

Why are you surprised? It's the norm these days.

What's wrong with coders? :)

 
sergeev:

Why are you surprised? It's the norm these days.

What's without coders?:)

there's a place... :)