Unprofitable trades 0!!!!!! - page 6

 
granit77 писал(а) >>
Am I correct in assuming that this is a constant asymmetry, independent of the current trend?
I am assuming that the asymmetry is constant...
 
Neutron писал(а) >>

to KimIV

Thank you. I see what you mean.

Another interesting thing is this. If we take a sufficiently long time interval (the number of bars > 1000), we can ascertain that the number of positive increments tends to the number of negative ones. On the other hand, the average absolute value of increments (on the selected TF) depends on the instrument price, i.e. <dS/S>=const. But then with the equality of upward and downward movements we are bound to have different amplitudes of these movements - the average amplitude of the upward movement will always be a bit larger than for the downward movement...

Is there any way to exploit this?

Of course, and it should even be exploited. I'm sure it is possible to build a trading system based on the skewness you mentioned.

 

Well then how do we optimise for + - trades if we trade in batches. The idea is that a batch of orders gives + which is the target, even if one or more orders in a batch are closed in minus, then the sum of the batch will still be plus, i.e. the target. Then how should we optimise according to your method? Clearly, if the entire pack closes in the negative, then the autolot will also reduce the bet.


 

The result of this pack was 10 positive trades and 8 negative trades, and a profit on target of +5 pips.

 

I suspect that the EA is supposed to drain on a prolonged trend. Or have you solved this issue somehow?

P.S.

"And as I've just noticed, no flogging!"© song

super-signals?

 
granit77 >> :

I suspect that the EA is supposed to drain on a prolonged trend. Or have you solved this issue somehow?

Why should it fail? I showed you a picture where he didn't hit the trend and how he got out of that situation. Of course it all depends on the margin size in this case, if it is not enough - then hang yourself. In this case, autolot is categorically contraindicated, because it is not 100% hitting the trend line. Although it is also a very effective system, I can lay out the code.

 
Enjoy. It works effectively on 1M with balance optimisation on volume and target. This is not a lossless one of course, but I would recommend it, I even had it for a while on a real account, it made a profit little by little.
//+------------------------------------------------------------------+
//|                                            sell&buy by Hoper.mq4 |
//|                                                    Yeisk 2008    |
//+------------------------------------------------------------------+

extern double lots=0.1;
extern double target=4;
int cbars=0;
extern int magic=454545;
extern int dist=10;

int start() {

 double profit=0;
 int j=OrdersTotal()-1;
 for (int i= j; i>=0; i--)
  {
   OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
   if(OrderMagicNumber()== magic && OrderSymbol()==Symbol())
   profit=OrderProfit()+OrderSwap()+ profit;
  }
 
 if ( profit>= target)
  {
   j=OrdersTotal()-1;
   for ( i= j; i>=0; i--)
       {
     OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
     RefreshRates();
     if(OrderType()==OP_BUY && OrderMagicNumber()== magic && OrderSymbol()==Symbol())
      OrderClose(OrderTicket(),OrderLots(),Bid,3,Blue);
    }
  }
 
 double sig = Lowest(NULL,0,MODE_LOW, dist,0);
 if( cbars!=Bars && sig==1)
  {
   RefreshRates();
   OrderSend(Symbol(),OP_BUY, lots,Ask,3,0,0,"buy", magic,0,Blue);
   string AN="ArrBuy "+TimeToStr( CurTime());
   ObjectCreate( AN,OBJ_ARROW,0,Time[1],Low[1]-6*Point,0,0,0,0);
   ObjectSet( AN, OBJPROP_ARROWCODE, 233);
   ObjectSet( AN, OBJPROP_COLOR , Blue);
  }

 profit=0;
 j=OrdersTotal()-1;
 for ( i= j; i>=0; i--)
  {
   OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
   if(OrderType()==OP_SELL && OrderMagicNumber()== magic && OrderSymbol()==Symbol())
   profit=OrderProfit()+OrderSwap()+ profit;
  }
 
 if ( profit>= target)
  {
   j=OrdersTotal()-1;
   for ( i= j; i>=0; i--)
    {
     OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
     RefreshRates();
     if(OrderType()==OP_SELL && OrderMagicNumber()== magic && OrderSymbol()==Symbol())
      OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
    }
  }
 {
 sig = Highest(NULL,0,MODE_HIGH, dist,0);
 if( cbars!=Bars && sig==1)
     {
   RefreshRates();
   OrderSend(Symbol(),OP_SELL, lots,Bid,3,0,0,"sell", magic,0,Red);
   AN="ArrSell "+TimeToStr( CurTime());
   ObjectCreate( AN,OBJ_ARROW,0,Time[1],High[1]+6*Point,0,0,0,0);
   ObjectSet( AN, OBJPROP_ARROWCODE, 234);
   ObjectSet( AN, OBJPROP_COLOR , Red);
  }
}
 cbars=Bars;
 
 return(0);
}
 

No one's given up on code yet, I'm no exception. :))

And I made an assumption about the drain, looking at the second picture. I do not pretend to be accurate, I will simply tell you what I saw in it.

The strategy is based on the super-signals indicators (or a similar built-in device for search of extrema) and stochastics.

When the stochastic is overbought, for example, entries are made downwards on the SS signals, assuming a trend reversal, usually with a lightweight martingale.

Exits are to the author's taste, either by counter signal, or by total profit, or other options.

When the reversal is delayed, the number of open positions increases rapidly (there are 18 of them in the picture), the free margin is melting. We usually manage to optimize the stochastic period,

But in any case there is a trend which is beyond the scope of any deposit and which the Expert Advisor sells before it has finished.

That is why I am interested if you have invented something that would not try to go against the trend, or you just consider any trend to be finite and the price as a return one?

P.S.

While I was writing, the code appeared. You should not have shown filtering by stochastic, it is far from being a novelty. The output may be better than the counter signal,

But the lifetime of the strategy is up to the first good irreversible trend.

It does not exclude earning on real trade (it worked for me), but one should treat with an adviser as with a cocked grenade under a pillow. :))

 

Dear Granite, have you seen a stochastic anywhere in my code? And what about the rapid growth of orders when the trend changes - this is nonsense, the EA opens in any direction of the trend when it sees a signal. In essence it is a kind of martingale - a tower and a bottom, the example of this is picture 2, where we open SELL on the tower, the tower is broken and goes further up, with any surge there will be a tower until the trend reverses. Suppose for example with $500 depo the volume 0.01 or 0.02 is enough for such blunders. This EA may bring not much, but it is stable and frequent.

Here is his schedule for 3 weeks of testing (no difference to the real one) (initial deposit 500, volume 0.01, target 5, distance 9)


 

I do, I do. So far so good, as the man said, flying past the 12th floor.

I wrote this post without having seen the code yet, so stochastic is a guess (useful by the way).

Understand, I'm not criticizing your code, I just stand by my opinion that this strategy will become full-fledged after adding trend analysis system to it.

I wonder what KimIV thinks on this subject ?

Reason: