Experts: Trend_Catcher - page 8

 

Hi Dmitriy, 

Correct me if I am wrong, but I believe there is a mistake in your experts logic, because Lot is always =0 and One_Lot*Lot will always be 0.  I believe it should be One_Lot*Lot_History?

double stops=MarketInfo(Symbol(),MODE_STOPLEVEL)*Point;
   double One_Lot=MarketInfo(Symbol(),MODE_MARGINREQUIRED);
   double Lot=0;
   if(sl>0&&AccountFreeMargin()>=One_Lot*Lot) {Lot=NormalizeDouble(Procent/sl*Point/MarketInfo(Symbol(),MODE_TICKVALUE),2);}
   if(sl>0&&AccountFreeMargin()<=One_Lot*Lot) {Lot=NormalizeDouble((AccountBalance()/100*Risk)/sl*Point/MarketInfo(Symbol(),MODE_TICKVALUE),2);}
 
Povilas Damarackas:

Hi Dmitriy, 

Correct me if I am wrong, but I believe there is a mistake in your experts logic, because Lot is always =0 and One_Lot*Lot will always be 0.  I believe it should be One_Lot*Lot_History?

Hi, thank you for your attention to EA.

Yes, your write, code EA needs update, but there are no mistake, it is not critically, becorse:

if(sl>0&&AccountFreeMargin()>=One_Lot*Lot) {Lot=NormalizeDouble(Procent/sl*Point/MarketInfo(Symbol(),MODE_TICKVALUE),2);}


AccountFreeMargin() will be more 0, then Lot will be = NormalizeDouble(Procent/sl*Point/MarketInfo(Symbol(),MODE_TICKVALUE),2)

if(sl>0&&AccountFreeMargin()<=One_Lot*Lot) {Lot=NormalizeDouble((AccountBalance()/100*Risk)/sl*Point/MarketInfo(Symbol(),MODE_TICKVALUE),2);}
if we have no margin to open a calculation lot after increasing, we will open lot wich will be calculated from Account Balance or if(Lot<MarketInfo(Symbol(),MODE_MINLOT)) {Lot=MarketInfo(Symbol(),MODE_MINLOT);} min Lot
 
any new version available?
 
Francis Dogbe:
any new version available?

trend_catcher_v2.mq4 - last version. When there are will be new update, you will report by "Favorites".



Best Regards,

Dmitriy

 
Dmitriy Epshteyn:

trend_catcher_v2.mq4 - last version. When there are will be new update, you will report by "Favorites".



Best Regards,

Dmitriy

ok thanks
 
Bad EA! It's Capital dinstructor|
Reason: