Hi guys can anybody tell me how can I reset all variables that I have make in my coding? Because I have problem with this part of code...
In theory when I get White line which is that last "if" I give variable mStoredTimeBearish zero value... this mean that after that, first "if" in this part of code will not be true anymore because 0+mCheckingTime is not bigger than iTime(NULL, 1, 0). But problem is that I am still receiving Lime line after I received White line which is wrong and stupid. Can someone tell me what I am doing wrong. I have attached also pics where you can see that on chart.
In theory when I get White line which is that last "if" I give variable mStoredTimeBearish zero value... this mean that after that, first "if" in this part of code will not be true anymore because 0+mCheckingTime is not bigger than iTime(NULL, 1, 0). But problem is that I am still receiving Lime line after I received White line which is wrong and stupid. Can someone tell me what I am doing wrong. I have attached also pics where you can see that on chart.
Inserted Code
if(((mStoredTimeBearish + mCheckingTime) > iTime(NULL, 1, 0)) && mPriceAction == 3)
{
if(mLowVolumePrice < iClose(NULL, 1, 1))
{
if((iVolume(NULL, 1, 1) < (iVolume(NULL, 1, iLowest(NULL, 1, MODE_VOLUME, mNoBars, 2)))) && (iClose(NULL, 1, 1) < iOpen(NULL, 1, 1)))
{
mStoredMinVolumeTime = iTime(NULL, 1, 1);
mPriceAction = 4;
ObjectCreate("mDivLine5"+Time[1], OBJ_VLINE, 0, 0, 0, 0, 0);
ObjectSet("mDivLine5"+Time[1], OBJPROP_COLOR, Lime);
ObjectSet("mDivLine5"+Time[1], OBJPROP_STYLE, STYLE_DOT);
ObjectSet("mDivLine5"+Time[1], OBJPROP_WIDTH, 1);
ObjectSet("mDivLine5"+Time[1], OBJPROP_TIME1, iTime(NULL, 1, 1));
ObjectSet("mDivLine5"+Time[1], OBJPROP_BACK, true);
}
}
if(mLowVolumePrice > iClose(NULL, 1, 1))
{
DrawLine1(White, Time[1]);
mStoredTimeBearish = 0;
}
}