I experience again a really weird problem. I use the following code to get cashmarket high/low:
if time=090000 then
Cashopen=intradaybarindex
endif
if time=173000 then
CashHigh=highest[intradaybarindex-cashopen](high)
CashLow=lowest[intradaybarindex-cashopen](low)
endif
The code works in an indicator i coded but when i use it in a strategy it works also great except on tuesdays!? On tuesdays it will not update CashLow and CashHigh and i have the whole tuesday still the high/low from fridays session in the variables instead of the values from monday. All other weekdays in works fine.
I’m with IG if this makes a difference.
Any ideas? Anybody?
Have you tried to GRAPH (in strategy) and RETURN (indicator) all the variables to try and see what is going on?
// For Strategy
GRAPH CASHOPEN
GRAPH CASHHIGH
GRAPH CASHLOW
GRAPH INTRADAYBARINDEX
//For Indicator
Return cashopen as "cashopen", cashhigh as "cashhigh", cashlow as "cashlow", intradaybarindex as "intradaybarindex"
Yes, i used graph but it only reveals what i already know. Tuesday the variables do not update. All other it works. And this is only for the strategy. The indicator runs fine.