Yusuf's floodwaters - page 6

 
Mathemat:

Yusuf, you will begin to understand everything when you start testing it with your hands. It's just that you are overwhelmed with so much brand new information that you are confused. You still have so much to learn...

Be sure to test it manually, feel each deal and double-check the result of each deal. You may not be satisfied with the scheme of the EA, which sanyooooook offers, - and then do everything manually, just as you need according to the logic of your work.

And understand the most important thing: the system, which does not have a martingale, does not necessarily have to be profitable.

In his scheme it is enough to replace the element of random entry by the result of a previous transaction and arrange the withdrawal of excess funds, see, maybe there will be no need to withdraw, if we get a positive mathematical expectation.
 
yosuf:
In his scheme it is enough to replace the entry randomness element with the result of a previous trade and arrange for withdrawal of excess funds, let's see, maybe there will be no need to withdraw, if we get a positive mathematical expectation.
And if a previous trade was opened absolutely accidentally against the trend and absolutely accidentally buried in the plus, and 2-3 more before it the same?
 
yosuf:
In his scheme it is enough to replace the entry randomness element with the result of a previous trade and arrange for withdrawal of excess funds, let's see, maybe there will be no need to withdraw, if we get a positive mathematical expectation.
Fine. Be sure to do all this manually on the history. This is for you the only and most reliable way to feel what the market is. By doing so, you will take a step towards acquiring a great ability: you will be able to clearly tell both yourself and others what you want from it.
 
sanyooooook:
what if the previous trade was opened against the trend and absolutely accidentally buried in the plus, and 2-3 more before it did the same?

We will not have any random open positions, it will be a natural opening in the direction of the trend, and the result, I agree, may be a loss, but the next trade should cover the loss, let's see, let's not guess. The market will judge.
If by chance we got a profit, we must also believe in this chance, until we get it back. Randomness is a manifestation of necessity, argued K. Marx.

Strangely enough, everything that happens does, so far, correspond to the spirit of the branch and looks vague on the level of telepathy.

 
Tantrik:
Yusuf! You may not believe it, but I've been testing this system (for 4 months) with minor adjustments - for example, I opened a sell and went down in value, opened a buy, got a profit, opened a buy again. Got below the Buy price-opened the Buy position-earned profit-opened the Sell position again, etc. I traded the maximum number of pairs at once - after an equity gain of 10-20% I closed everything and started again! (both the chart and the sit).
I reached the final profit, please provide me with materials. And now I have to automate this process and let a robot do it
 

Can you drop the state here, Igor? Let's try to telepathize...

yosuf: А теперь надо автоматизировать этот прцесс и поручить роботу

No, no, no automation first! Hands-a-mi, Yusuf! You're always in a hurry and jumping over steps you haven't learned yet. It's too early for you to use a robot. You don't know the basics yet, you're confused with the profit of the position...

However, if you want to remain unlearned, it's up to you, I won't insist.

 
Mathemat:

Can you drop the state here, Igor? Let's try to telepathize...

No, no, no automation first! Hands-a-mi, Yusuf! You're always in a hurry and jumping over steps you haven't learned yet. It's too early for you to use a robot. You don't know the basics yet, you're confused with the profit of the position...

However, if you want to remain unlearned, it's up to you, I won't insist.

Let it be your way, but do you think it is too early to create an advisor to remove the psychological component?
 
Tantrik:


The system had shortcomings, which I did not take into account at first - there was silver in both dollars and euros in trading.

It started in 2000. And there are more than a thousand deals! (what are the trades for? - there is no system at all).


Do you blame the TS or your own negligence for this loss?
 
//---- input parameters
static int trend=0;
static double balance;
//-- Подключаемые модули --
#include  "Common.mq4" 

int CountTrades() {
   for (int trade = OrdersTotal() - 1; trade >= 0; trade--)
   {
      OrderSelect(trade, SELECT_BY_POS, MODE_TRADES);
      if (OrderMagicNumber() != ExpertMagicNumber) continue;
      if (OrderSymbol() != Symbol()) continue;
      if (OrderType() == OP_BUY) return(1);
      if (OrderType() == OP_SELL) return(-1);
   }
   return (0);
}
//+----------------------------------------------------------------------------+
//|  Формирует торговые сигналы.                                              |
//+----------------------------------------------------------------------------+
void GetSignal()
{
   // your code
   int cnt = CountTrades();
   double newbalance = AccountBalance();
   if (cnt == 0)
   {
      if (trend > 0)
      {
         if (balance > newbalance)
         {
            trend = -1;
            Sell();
         }
         else
         {
            Buy();
         }
      }
      else if (trend < 0)
      {
         if (balance > newbalance)
         {
            trend = 1;
            Buy();
         }
         else
         {
            Sell();
         }
      }
      else if (trend == 0)
      {
         Buy();
         trend = 1;
      }
   }
   balance = newbalance;
//----
   return;
}

//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
{
  if (AllowSignal())
  {
   GetSignal();
   Start();
  }
//----
   return(0);
}

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
{
   int res = Init(false);
//----
   //your code
   balance = AccountBalance();  
//----
   return(res);
}

//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
{
   int res = Deinit();
//----
   //your code
//----
   return(res);
}

The best result with these parameters on historical data, in my opinion, is because TP > SL.


 
yosuf:
... Sell takes a profit, ... Entry will be Sell again, until the trade is losing.

Why are you repeating the Sell again? Sell has worked out - now wait for Buy.

A Sell close is equivalent to a Buy operation, and vice versa a Buy close is equivalent to a Sell operation:

"Sell close" = "Buy"

"Closing Buy" = "Sell".

If you close Sell (do Buy) and immediately open Sell (do anti-Buy - which equals closing Buy), then what is the result of this operation:

Buy + Anti-Buy = ? (Try to answer yourself what would be the MO of this operation). If it is difficult, try to make 10 (or 100) such operations in your demo account and divide the resulting Profit(Loss) by the number of operations.

" Immediately anti-Buy Buy" + " Immediately anti-Buy Buy" + ... + "Buy immediately Anti-Buy" + "Buy immediately Anti-Buy" + ...

Repeat this N times, then divide the result by N

Reason: