You could use Time[3] to find the time of 3 bars ago, then compare this to the time co-ordinate of an object.
ObjectGet( string name, OBJPROP_TIME1)
But you will have to know the name of the object, or loop through all objects of the type to see if one has the same time value.
FX_Hustler: if ((contition1) && (contition2) && (3 bars ago an object was create)) {...}
- There is no object creation time, they just exist. For arrow you can use the time of the bar they're at. For trendlines the start and end times.
- You know when the object was created, that was when condition1 and condition2 were both true. Either remember the time (in a static) or loop through the bars and find the conditions again.
Thanks for the support guys!
Finally i figured out!
if (condition1) && (condition2) && (buffer_var[shift4]==High[shift4]+spacer) {....}
if (condition1) && (condition2) && (buffer_var[shift4]==Low[shift4]-spacer) {....}
My 3rd condition is exactly the same code that i used to plot the arrows on the chart, with the diference on the variable "shift". The code to plot the arrows instead use shift4, uses shift1.
I also tried:
ObjectGet( string name, OBJPROP_TIME1)
But doesn't worked for me, maybe i did something wrong.
Thanks again! Nice trades for both!
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
I have created a signal that shows an arrow above or below the candle that match my conditions, and now i'm trying to create another arrow signal to be showed 3 bars after the last signal.
I need to create a condition like this: