[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 244

 

Talking about the fact that in a string

lot = NormalizeDouble(...,   1 );

normalisation can be up to two digits (0,1,2).

 
Martingeil писал(а) >>

If I understand correctly, can I make a step - is it by how much of the balance will be added to the lot?

Or do you mean to have a constant curve of lot increase, but I do not see the point in such a progression.

extern double Maximum_Risk=5.0;
extern double lot=1.0;

//+------------------------------------------------------------------+
//|    РАССЧЕТ РАЗМЕРА ЛОТА                               
//+------------------------------------------------------------------+
double LotsOptimized() {
   double lots_min =MarketInfo(Symbol(),MODE_MINLOT);
   double lots_step=MarketInfo(Symbol(),MODE_LOTSTEP);
   double lots_max =MarketInfo(Symbol(),MODE_MAXLOT);

   double lot= Lot;   

   if ( Maximum_Risk>0){
      lot=MathCeil(AccountBalance()/ Maximum_Risk/100000/MODE_LOTSTEP)*MODE_LOTSTEP;

      lot=MathMax( lots_min, MathMin( lots_max, lot));
   }
   return( lot);
}
Something like this
 
OneDepo >> :

Talking about what's in the line

normalisation can be up to two digits (0,1,2).

corrected.

only I think I meant a constant progression of lot increase............

 
Martingeil >> :

If there are unprofitable trades, then the lot will be reduced to the initial one.


Of course MM is cool ;)

I just have doubts with my code: on demo account everything is correct, and on real account (micro account in FXstart) it seems to be 2 times less.

That's why I would like to know how to correctly calculate the percentage of AccountBalance().


P.S. I trade manually with scripts, so I don't need MM.

 

Hello!

Please help me with the error code.

The error itself:

......\MetaTrader - Alpari\experts\indicators\signalTable_v1.mq4;114:1;'\end_of_program' - unbalanced left parenthesis

I understand that 114 is a line and 1 character place (more precisely, the error itself before this character place).

So, after compiling this error happens. Here is a piece of code......

      // сигнал на покупку
      if(MathAbs(iWPR(Symbol(), period[ x],13,0))<20.0)
         ObjectSetText("signal"+ x+"1",CharToStr( symbolCodeBuy), fontSize,"Wingdings", signalBuyColor);
      // сигнал на продажу   
      else if(MathAbs(iWPR(Symbol(), period[ x],13,0))>80.0)
            ObjectSetText("signal"+ x+"1",CharToStr( symbolCodeSell), fontSize,"Wingdings", signalSellColor);
      // нет сигнала
      else     // как раз перед else и есть это злополучное ПЕРВОЕ знако-место
           ObjectSetText("signal"+ x+"1",CharToStr( symbolCodeNoSignal), fontSize,"Wingdings", noSignalColor);
Can anyone give me a hint......... I'm grateful in advance
 
Martingeil >> :

No, that's not how the algorithm works.

cci_0< cci_1 && Bid-OrderOpenPrice() == Point* profit

according to your strategy, the logic here is correct.



The strategy is wrong.



At least it's like this:







cci_0< cci_1 && Bid-OrderOpenPrice() >= Point*5 && Bid-OrderOpenPrice() <= Point*10



 

hint

For OrderSelect it is clear what is written in brackets

But, for example, for OrderCloseTime() or OrderLots() - why brackets and what can be written in them?

 
gramp >> :

hint

For OrderSelect it is clear what is written in brackets

But, for example, for OrderCloseTime() or OrderLots() - why brackets and what can be written in them?

Simply put, brackets are a feature which distinguishes functions from variables.

But if purely for yourself, you can write anything:))))

 
igrok2008 >> :

Hello!

Please help me with the error code.

The error itself:

I understand that 114 is a line and 1 character place (more precisely, the error itself before this character place).

So, after compiling this error happens. Here is a piece of code......

Can anyone give me a hint......... I'm grateful in advance

Once again. The error unbalanced left parenthesis means that parentheses in the code are unbalanced, in this case there are fewer closing parentheses than opening. The fact that the compiler referred to line 114 does not mean anything, because the mql4 compiler cannot correctly find this error in the text, most often referring to the end of the file, but actually it may refer to some other place of its own choice. So the only option to fix the error is to find an extra opening or missing closing parenthesis. Go back three pages, I showed you where brackets are missing in your code.

 
Guys, please advise. Standard Parabolic indicator. Which place in the code is responsible for changing the direction of the parabolic. Thank you!
Files:
parabolic.mq4  6 kb