I made one of these things once ... - page 14

 

Privaval is banned and somehow silent, so I'll start with a message for him: Sergey, if you're reading this, let me know sometime if you got my reply to your email.


In the meantime, I've made a script, marking the levels according to another idea - and these levels look great. Unfortunately it's a bit heavy for collecting good statistics. But I have a suspicion that nearly any level system can look good on a price chart :)


Besides, I've taken the time to write a Strategy Tester Expert Advisor using the algorithm described above. However, I have not tested it yet because I have just finished it and I do not like Expert Advisors. However, it seems to work. Here is the full code in attachment for demonstration.

int start() {
  if (Start) {
    Start = false;
    HalfPoint = 0.5*Point;
    DLvl = 1000*Point;
    RecDLvl = 1.0/DLvl;
    dStopLevel = StopLevel*Point;
  }

// Блок сопровождения ордеров
  double Price;
  bool IsBuyStop = false;
  bool IsSellStop = false;
  for(int ord=OrdersTotal();ord>=0;ord--) {
    if(OrderSelect(ord,SELECT_BY_POS,MODE_TRADES)==false) continue;
    switch(OrderType()) {
      case OP_BUY: 
        if (TimeCurrent()-OrderOpenTime() > LT) OrderClose(OrderTicket(),OrderLots(),Bid,5,Blue);
        break;
      case OP_SELL: 
        if (TimeCurrent()-OrderOpenTime() > LT) OrderClose(OrderTicket(),OrderLots(),Ask,5,Yellow);
        break;
      case OP_BUYSTOP: 
        IsBuyStop = true;
        Price = GetBuyStopLevel(dStopLevel);
        if (OrderOpenPrice()-Price > HalfPoint) OrderModify(OrderTicket(),NormalizeDouble(Price,Digits),0,0,0,Blue);
        break;
      case OP_SELLSTOP: 
        IsSellStop = true;
        Price = GetSellStopLevel(dStopLevel);
        if (Price-OrderOpenPrice() > HalfPoint) OrderModify(OrderTicket(),NormalizeDouble(Price,Digits),0,0,0,Yellow);
        break;
    }  //  switch(OrderType())
  }  //  for(int ord=OrdersTotal();ord>=0;ord--)
  
//  Блок установки орлеров  
  static int Mnt;
  static int PreMnt;
  Mnt = TimeMinute(TimeCurrent());
  if (Mnt != PreMnt) {
    PreMnt = Mnt;
    if (!IsBuyStop) OrderSend(Symbol(),OP_BUYSTOP,Lots(),NormalizeDouble(GetBuyStopLevel(dStopLevel),Digits),5,0,0,NULL,0,0,Blue);
    if (!IsSellStop) OrderSend(Symbol(),OP_SELLSTOP,Lots(),NormalizeDouble(GetSellStopLevel(dStopLevel),Digits),5,0,0,NULL,0,0,Yellow);
  }
  return(0);
}

I cannot move on without Prival, he will have to say whether the test is his or not.


P.S. Expert Advisor only for five digits.

Files:
 

Changed the Expert Advisor, if we are focused on the reversal at the level, then on the first approach to the level a stop order should not be placed. Roughly speaking, the previous EA should give the same amount of bais and sells at each level, while this EA should give one more buy when approaching from above and one more sell when approaching from above and vice versa.

The slope of the plum for the 00 level and the 20 ppt (five digit) stopwave has a slightly smaller spread per trade, it's eurodollar from the summer of 2004

Dependence of balance on the level (i.e. optimization by Delta parameter in increments of 50 points (five digits)) is quite consistent with the previously obtained data on intersections of one-minute bars


Logically it is now time to talk about many things; about slips, about ships, about seals, about cabbages and kings, and about other contexts and filters. :)

 

try to introduce stops and separate breakout and bounce strategies by time/volatility.

 

The number of possible variants is very large, which is why it makes sense to collectively investigate. It is clear that it is necessary to vary the code, that is, without some initial skills in mql will be difficult to do. The main thing is that the results and the way they are obtained will only be useful if they are published. Well, okay, the grail may be forbidden :), but certainly people should know the negative results.


Stops to enter - it's quite a standard insertion in the code. But in my opinion, if it is not a distant "insurance" stops then it will not give anything but another way of fitting.


It is very easy to make a breakout strategy as if it were - just disable setting orders if there is any order of the same direction (not only pending) and set a sufficiently big stop (comparable to the distance between levels). But to make a correct only rebound from that simple and beautiful scheme was not so easy for me. In idea, we should time the fact of level crossing and place an order only after it is done. The subtlety is that this fact cannot be registered for the nearest level in a standard way - after all, the nearest level bounces at the moment it is crossed. It can last as much as three ticks if the average level is exactly on the level. That is why the results of the previous post were obtained using the considerably changed Expert Advisor. I didn't post it here because it was suggested for Codobase (how else to understand the level of real interest in this subject :)).


The time filters are considered one of the most effective and usually quite simple to implement, it would be interesting to see the results. You are welcome to send me a message :)


Of course volatility filters are also of great interest, but there are even more construction variants, we need specific variants and results for them.

 
You can get an expert here.
 

An inaccuracy was found in LevelsTrade_1.mq4 that leads to asymmetry of a buy-sell. Here we need to replace one line in this function:

double GetSellStopLevel(double StopLvl) {
  int ILvl = (Bid+HalfPoint)*RecDLvl;
  double DownLvl = DLvl*ILvl;
//  if (DownLvl > Bid-StopLvl-HalfPoint) DownLvl -= DLvl ;
  if (Bid-StopLvl < DownLvl-HalfPoint) DownLvl -= DLvl ;
  return (DownLvl);
}

The wrong line is commented out here. The correct version is attached to the post.

Files:
 
Balbesik06:



Candid!

I saw you and I am addressing you.

Off-topic question.

Would you like to get back to Zig-Zag?

I wrote to you in "private", there was no reply.

And on the EA (argue or not), I have statistics (on mine) 7(+) - 1(-), but the EA of another author.

And there are a lot of questions.

If you check it (in private) and statistics are confirmed, then you correct Zig-Zag for me according to your scheme.

And algorithm (for Expert Advisor) you have the right to post later.

Do you like it?

Sincerely.

 
Balbesik06:

...

I have written to you in the 'private' section and there has been no reply.

I haven't heard anything in private, try again. As a last resort you can email me, my profile has the address of my page, it's easy to find my email there.
 
Balbesik06:

"... At the very least, you can email,"...

Yes try - past the subject.

The point is simple - demonstrated on ONIX all "fly off" except yours.

I don't see the point in any sevetnik if it "DOES NOT HOLD" quotes.

Regards.


P.S. Try (if it's not too difficult) to write - Hello.
 

Hmm, checked the Onyx mailbox (and I rarely look there), it's empty. And the problems with the mail are quite mysterious.

Eugene, let me put it this way: Check your personal account on this forum, there should be a message from me there since the day before yesterday. Just answer it, describe the problem or give a link to its description, write what exactly you need.

As far as I understand, there is a problem with hanging vertices of different Zigzags. Mine doesn't have this problem. I remember, when I wrote that zigzag (most likely it was CZZ) vertex hanging problem was almost universal. I tried to understand its cause, and I think I did. But a lot of water has passed since then, and I think now a lot of zigzags don't freeze anymore either.

In any case, it's not clear what exactly you need? For me to redo all the zigzags included with the ZUP?