Download MetaTrader 5

Drawing Rectangle partially disturbed pls Help

To add comments, please log in or register
thojoboy
9
thojoboy  

Hey Guys its kinda strange, and i don´t get the problem solved.

Maybe some stupid failure pls help ;)

a bit German included but not important ^-^



This works perfectly.

void drawVerticalLine(double Rastercounter, int Teilnehmer)

   string  lineName   = "asdf";
  
   if(ObjectCreate(0,lineName, OBJ_RECTANGLE, 0, Time[0], 1.055, Time[barsToProcess], 1.070))  //barsTo Process is a input variable of course
   {
     //shit and stuff
     
   }
}

But i need multiple Rectangles with diffrent hights, but same Times, so with Lines i usually do things like this

void drawVerticalLine(double Rastercounter, int Teilnehmer)

   string lineName = "Linename and Number:"+ Teilnehmer;  //tried it diffrent ways

  // in debug the string is correctly "Linename and Number: 1" etc.

  // time changest too all ok, even when i include my variable istead of 1.055 and 1.070 ....... no clue

 // it just doesn´t work.

  
   if(ObjectCreate(0,lineName, OBJ_RECTANGLE, 0, Time[0], 1.055, Time[barsToProcess], 1.070))  //barsTo Process is a input variable of course
   {
     //shit and stuff 
     
   }

}


Object manager

looks nice but doesnt show anything now. :/


edit:

ok i got <Deleted> up my parameters a bit, but it still doesnt display the rectangle?  (the Number is displayed this is an diffrent error i know about forget it (: )



WHY

thank you for your time

honest_knave
Moderator
2325
honest_knave  

Double click the rectangles in that list.

Check the Parameters tab - do the positions look correct?

Also, if you put 2 objects exactly over the top of each other they will "disappear".

Example with some overlap to illustrate the point:

 

thojoboy
9
thojoboy  


Thank you you helped me a lot its not solved yet but i am 95% sure whats the problem.

i Set barsToProgress to 20.  then there should be drawn one rectangle. But in the Object Manager you see four, and all have the same parameters.

--> my outer loop who opens the funktion is opened more then one with same parameters.

Parameters are perfekt, but it is drawn more then one time over each other, the same with the counting number.



It is a loop like for(i .......for(i .......for(i .......for(i .......)))) a bit complicated.

Is there an easy way of doing this? If("Linename and Number"+counter==allready drawn){dont do it}

Would be nice, but you already helped me a lot thxs.

To add comments, please log in or register