
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is there a way to place an arrow at the previous bar before the current?
This will place an arrow at the currnet bar;
ObjectDelete("MdSymbolAi");
ObjectCreate("MdSymbolAi", OBJ_ARROW, 0, Time[0],vL);
ObjectSet("MdSymbolAi", OBJPROP_ARROWCODE, SYMBOL_ARROWUP);
ObjectSet("MdSymbolAi", OBJPROP_COLOR,Lime);
This will place an arrow at the maximum and minimum values for the Open of the previous 5 bars;
{
CntBars = 5;
int lowshift=iLowest(NULL,0,MODE_OPEN,CntBars,0);
double Minimum=Open[lowshift];
datetime lowtime=Time[lowshift];
int maxshift=iHighest(NULL,0,MODE_OPEN,CntBars,0);
double Maximum=Open[maxshift];
datetime maxtime=Time[maxshift];
for(i=0;i<CntBars-1;i++)
{
if (Low[i]< Minimum)
{Minimum=Low[i]; n = i;
ObjectCreate("UpSymbolAb", OBJ_ARROW, 0, lowtime,Minimum);
ObjectSet("UpSymbolAb", OBJPROP_ARROWCODE, SYMBOL_ARROWUP);
ObjectSet("UpSymbolAb", OBJPROP_COLOR,White);
}
if (High[i]> Maximum)
{Maximum=High[i];
ObjectCreate("DnSymbolAb", OBJ_ARROW, 0, maxtime,Maximum);
ObjectSet("DnSymbolAb", OBJPROP_ARROWCODE, SYMBOL_ARROWDOWN);
ObjectSet("DnSymbolAb", OBJPROP_COLOR,White);
}
I simply want to place an arrow at the previous bar, from the current bar.
Thanks!