I have an int variable that tracks trades set like this:
Daily Bars in progress:
I check some indicators in if statements, if the indicator is positive (in daily timeframe)
set tradecounter = 1;
end if
Minute bars in progress:
Once the indicator is set the tradecounter variable is checked in 10 minute timeframe the next day, if it =1 then I place an order like EnterLong(), then set tradecounter back to 0;
The only problem is, somehow the tradecounter is set to 1 even though the indicator is not showing on the chart or is not set to positive in the script even after I check via Print statement.
Any ideas? This results in some completely erroneous trades.
Comment