Hello I have a new question, I am in the 30min Chart and want to draw a vertical Line when the signals from stochastic indicator in the 4 hours Timeframe cross are be right.
For example I have tried to take the stochastic values from the 4 hour timeframe like this in variables
And than i have tried to draw a vertical Line when a cross signal came in
The problem is that the vertical Lines are not be draw at the right time, they are be drawing but not at the right time!
As you know I am in the 30 min Chart, is it altogether possible to make some one like this?
For example I have tried to take the stochastic values from the 4 hour timeframe like this in variables
Inserted Code
stoch4h=iStochastic(NULL,240,8,3,3,MODE_SMA,0,MODE_MAIN,i); stoch4h2=iStochastic(NULL,240,8,3,3,MODE_SMA,0,MODE_SIGNAL,i);
And than i have tried to draw a vertical Line when a cross signal came in
Inserted Code
if(stoch4h<stoch4h2){ //Sell signal if (!ObjectDelete(sellLine)) { Print("Can't delete vertical line! code #", GetLastError()); } if (!ObjectCreate(sellLine, OBJ_VLINE, 0, Time[i], 0)) { Print("Can't create vertical line! code #", GetLastError()); } } if(stoch4h>stoch4h2){//Buy signal if (!ObjectDelete(buyLine)) { Print("Can't delete vertical line! code #", GetLastError()); } if (!ObjectCreate(buyLine, OBJ_VLINE, 0, Time[i], 0)) { Print("Can't create vertical line! code #", GetLastError()); } }
The problem is that the vertical Lines are not be draw at the right time, they are be drawing but not at the right time!
As you know I am in the 30 min Chart, is it altogether possible to make some one like this?