This code will place an arrow on a chart with a unique name every second. Have tried everything to change arrow from up to down and change color from red to lime. Have had no luck. Is there some thing that I'm missing or not doing write?
ObjectCreate(StringConcatenate("ArrowUpA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ObjectCreate(StringConcatenate("ArrowDownA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ObjectSet("ArrowDownA", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
ObjectSet("ArrowDownA",OBJPROP_COLOR,Lime);
Does not work. Only produces red up arrow.
PeriodA = (iClose(NULL,1,0))
The name of the object StringConcatenate("ArrowDownA", TimeCurrent()) is not "ArrowDownA".
ObjectSet() just can't find the object.
The name of the object StringConcatenate("ArrowDownA", TimeCurrent()) is not "ArrowDownA".
ObjectSet() just can't find the object.
Is there a way to change the arrow then?
I tried assigning the v alue of ArrowDown to ArrowA before the Alert, but made no difference. Only produces red, up arrow.
ObjectCreate(StringConcatenate("ArrowDown",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ArrowA = ArrowDown;
ObjectSet("ArrowA", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
ObjectSet("ArrowA",OBJPROP_COLOR,Lime);
string ArrowA, ArrowDown;
PeriodA = (iClose(NULL,1,0))
The name of the object StringConcatenate("ArrowDownA", TimeCurrent()) is not "ArrowDownA".
ObjectSet() just can't find the object.
What Irtron is saying is that the unique name of the arrow is :StringConcatenate("ArrowDownA", TimeCurrent())
Which is what ObjectsSet() is looking for.
This might work.
ObjectSet("StringConcatenate("ArrowDownA",TimeCurrent())", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
Keith
What Irtron is saying is that the unique name of the arrow is :StringConcatenate("ArrowDownA", TimeCurrent())
Which is what ObjectsSet() is looking for.
This might work.
ObjectSet("StringConcatenate("ArrowDownA",TimeCurrent())", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
Keith
Success!!! It works!
{ObjectCreate(StringConcatenate("ArrowDownA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ObjectSet(StringConcatenate("ArrowDownA",TimeCurrent()), OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
ObjectSet(StringConcatenate("ArrowDownA",TimeCurrent()), OBJPROP_COLOR, Red);}
Thanks!!!
This is a 1 minute candle chart.
Anyone here knows how to make the fractal behaving that way ?
The time is in Japanese time.
The arrow appears and disappears when the candle is not closed
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This code will place an arrow on a chart with a unique name every second. Have tried everything to change arrow from up to down and change color from red to lime. Have had no luck. Is there some thing that I'm missing or not doing write?
ObjectCreate(StringConcatenate("ArrowUpA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ObjectCreate(StringConcatenate("ArrowDownA",TimeCurrent()),OBJ_ARROW,0,Time[0],PeriodA);
ObjectSet("ArrowDownA", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
ObjectSet("ArrowDownA",OBJPROP_COLOR,Lime);
Does not work. Only produces red up arrow.
PeriodA = (iClose(NULL,1,0))