if(ToTime(Time[0]) > ToTime(14, 30, 00) && ToTime(Time[0]) < ToTime(15, 30, 00))
{
if (Close[0] > Bollinger(stddev,period).Upper[0] && Close[1] < Bollinger(stddev,period).Upper[0])
{
if(can_llong == true)
{
DrawArrowUp(CurrentBar.ToString(), true, 0, GetCurrentAsk(), Color.DodgerBlue);
can_long = false;
can_short = true;
}
}
if (Close[0] < Bollinger(stddev,period).Lower[0] && Close[1] > Bollinger(stddev,period).Lower[0])
{
if(can_short == true)
{
DrawArrowDown(CurrentBar.ToString(), true, 0, GetCurrentBid(), Color.Fuchsia) ;
can_short = false;
can_long = true;
}
}
Check that when Time is correct, if it crosses Bollinger puts an arrow and then touch Bollinger but could not go back to an arrow.
The problem I have found and it is very strange. When I put in 14:30:00 to 22:30:00 works fine. But when I put in 14:30:00 to 15:30:00 NOT WORK ....
Here I attached two images
You know any other way to do the same, but in different ways for this to work properly
ThankYou very much!
Comment