AlligatorEx. - page 2

 
ZZZEROXXX:

What has been tweaked in it that leads to worse results? TP, SL, or something else?

The Expert Advisor is not worse, what I mean is that when comparing the default settings and the ones shifted back a little, the result is not in favour of the former.
 
Oh, I see, it depends on the TF of course.
 
Attempting to close trades on a breakdown of the wrist turned out to be unprofitable, although I never understood why.
 

A little diversion from the topic of my EA.

I want to give you one EA, which I found yesterday in my stash when searching for code blocks for my EA (since I am not a pro at coding yet), it is not written by me, but in my opinion it is not a bad EA. It works on TF H1 and shows good results in the tester if I enabled Trawl function (I should enable it in settings). I have tested it with 100 EUR in lot 0.01 and it was winning, I think I can use it if I optimize it.

Files:
burn_v1.7m.mq4  18 kb
 
Here are the test results for 2011 of this advisor. It looks good to me.
Files:
 
Dizet_02:
Here are the test results for 2011 of this advisor. Looks good to me.
Here I put a balance of 1000 and lot 1.0
 

I can't find and fix a bug in the code. The code block is taken from the BURN EA above. Error '\end_of_program' - unbalanced left parenthesis.

The code of the EA is below.


Files:
 
I can't figure out where the parenthesis is missing.
 
Dizet_02:
I can't figure out where the bracket is missing.
In this f-i - at the bottom of the two underlined lines - two right brackets - one in each line.
//+------------------------------------------------------------------+
//| Уровень безубыточности |
//| Copyright © 2010, Khlistov Vladimir |
//| http://cmillion.narod.ru |
//+------------------------------------------------------------------+
int Profit()
{ 
int b,s;
double NULLPs,NULLPb,MargaSell,MargaBuy,price,price_b,price_s,lot,lot_s,lot_b;
color TextColor;
for (int i=0; i<OrdersTotal(); i++)
{ if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{ if (OrderSymbol()==Symbol())
{
price = OrderOpenPrice();
lot = OrderLots();
if (OrderType()==OP_BUY ) 
{
MargaBuy+=OrderProfit();
price_b = price_b+price*lot; b++; lot_b=lot_b+lot;
}
if (OrderType()==OP_SELL) 
{
MargaSell+=OrderProfit();
price_s = price_s+price*lot; s++; lot_s=lot_s+lot;
}
} } }
ObjectDelete("NULLPb");
if (b!=0) 
{ NULLPb = NormalizeDouble(price_b/lot_b,Digits);
ObjectCreate("NULLPb",OBJ_ARROW,0,Time[0],NULLPb,0,0,0,0); 
ObjectSet ("NULLPb",OBJPROP_ARROWCODE,6);
ObjectSet ("NULLPb",OBJPROP_COLOR, Blue);
}
ObjectDelete("NULLPs");
if (s!=0) 
{ NULLPs = NormalizeDouble(price_s/lot_s,Digits);
}
if (MargaSell<0) TextColor=Red; else TextColor=Green;
ObjectSetText("доходS",StringConcatenate("SELL ордеров =",s));
if (MargaBuy<0) TextColor=Red; else TextColor=Green;
ObjectSetText("доходB",StringConcatenate("BUY ордеров =",b));
}
 
Thank you very much, you saved me))))