[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 432

 
LOA:

The problem is this..... The indicator does not re-draw when new bars are formed. It is re-drawn if you change the t.f. or output

Proboy_Order_F5 is the main indicator I want to ask about

It is a re-drawing indicator and it needs to be able to replay the history. To do this, replace your two operators of variable limit calculation with the next one:

    int limit=MathMin(Bars-1, Bars-сounted_bars+T_Life_ORD+1);

Style-wise, systematic use in operators of variables which haven't been explicitly assigned values.

 
Mislaid:

This is a redrawing indicator and it should be allowed to peek at the history. To do this, replace your two variable limit calculation operators with the following one:

In style, the systematic use in operators of variables which have not been explicitly assigned values is annoying.


Thank you for your feedback!

I'll try to replace, I'll use your recommendation.

About variables.... If you mean the main indicator, its code is not the whole code. It is only its initial part, the basis. I've added some more tricks and user-defined functions there, I just haven't deleted the overrides, probably. And better yet, if you do not mind, please give me some examples of these variables (I am just learning and probably made too much of them). This will help me understand this issue as well.

 
LOA:


Thanks for the reply!

I'll try to replace it, I'll take your recommendation.

About the variables.... If you mean the main indicator, it's not the whole code. It is only the initial part, the basis. I've added some extra features and user-defined functions and probably not removed the variables. And better yet, if you do not mind, please give me some examples of these variables (I am just learning and probably made too much out of it). This will help me understand this question too.

Here is an example of only two operators. All variables proboy_Buy, Buy_Price_D, N_Buy have just been declared but they have not been assigned any initial value and a construction comes right away:

         //-----------------Проверяем время жизни ордера ?-------------------------------   
          if (proboy_Buy==true)
          {  
              if ( Buy_Price_D <= 0 && N_Buy >= T_Life_ORD+1) 

And most likely the following variables should be declared outside the loop

           double    Buy_Price,Sell_Price, //цена ордера
                     St_Buy_Price,St_Sell_Price,//цена стопа
                     Pr_Buy_Price,Pr_Sell_Price;//цена профита       
           
           int       n,
                     N_Buy, N_Sell;  //номер свечи ордера 
 
Mislaid:

An example of just two operators. All variables proboy_Buy, Buy_Price_D, N_Buy have just been declared, but no initial value has been assigned to them and the construction goes straight away:

And most likely, the following variables must be declared outside the loop




Okay. I'll think about it.

A little clarification: these variables get values at the end of the loop, so that they can use those values when changing to a new iteration. This is my idea so far (but I want to learn how to do it right)

I.e. the indicator uses the fact of breakdown on i, and subsequent actions should be used on i-1. You could, of course, use i+1 for the breakdown fact, but in this case, if I understand correctly, the zero bar is not taken into account.

 
Hronos:

Strange, I thought my question was a simple matter for an expert to solve and the thread is supposed to be for newbies.

Or is there selective help here?


Those who are trying to learn how to program in MQL4 get help here
 
PapaYozh:

Here you can help those who are trying to learn how to program in MQL4
I'm not asking you to write an indicator, I put some things into it myself, just add some code to make it draw correctly on the chart.
 
For myself, I think that if you want an answer, it is a mistake to think that someone is obliged to answer or correct something. There is only hope that it will not go unanswered.
 

Good afternoon!

Please help with indicator MA=iMA(NULL,0,TrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);

How can I give applied_price multiple values, and select the right one when needed?

 

I'll try again.

Can you tell me how to deal with a trivial problem - I have a hole in my EUR history June 2011 and then September and a bit of September is lost

in the \terminal\history\downloads\EURUSD folder there are these

EURUSD_2011_06_81625bcefc91bf488a04d5a1dae0c93f
EURUSD_2011_09_2557787db3eb2fe87073c783f21cdd66
EURUSD_2011_10_15793a4a4f9d001b78a82e248872bc3b

tried several different broker terminals, including native MQ. Also tried on different machines with XP and Win7. I tried deleting symbols.raw and symgroups.raw and downloading them again - it did not help.

or can someone upload the files

EURUSD_2011_07_xxx
EURUSD_2011_08_xxx
EURUSD_2011_09_xxx

 
Hronos:
I think for me, after my second post, everyone is just as good at flaming as they are at helping.
You just need to go to another thread. What is it with men being so touchy?
Reason: