- Period Question
- How to draw SetIndexStyle(0,DRAW_ARROW) in the background ??
- Time and Date Question
Is there a way to keep drawing an object on a chart, with the same name, continuously? Is there a way to make the name a variable?
No, you have to change the name, the way I do it is thus:
ObjectCreate(StringConcatenate(name,TimeCurrent()).......)
I use TimeCurrent because it changes every second, if you are doing work at the tick level you might, need to use another function which changes
faster, a tick count for example, or even a random number generator(don't know if MT4 has one)
HTH
Keith
Thanks for the input!
Name = "ArrowUpA"
PeriodA = (iClose(NULL,1,0)
ObjectCreate(StringConcatenate("ArrowUpA",OBJ_ARROW,0,TimeCurrent(),PeriodA));
Getting wrong parameters count.
Must be something I have wrong. Can you tell?
for sure the first part in red should be
ObjectCreate(StringConcatenate(ArrowUpA,TimeCurrent()), OBJ_ARROW,0,Ask);
this creates the unique name each iteration, I'm not too sure what parameters arrow takes, try what I have if that doesn't work you'll
have to research what the correct parameters are.
good luck
keith
for sure the first part in red should be
ObjectCreate(StringConcatenate(ArrowUpA,TimeCurrent()), OBJ_ARROW,0,Ask);
this creates the unique name each iteration, I'm not too sure what parameters arrow takes, try what I have if that doesn't work you'll
have to research what the correct parameters are.
good luck
keith
Got it to work with:
ObjectCreate(StringConcatenate("ArrowUpA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
Thanks! For the help!
Now working on creating one for ArrowDown, and assigning the color lime for ArrowUp and red for ArrowDown.
Thanks again!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use