Strange problem recovering high/low

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34376 quote
    Despair
    Blocked
    Master

    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?

    #34467 quote
    random45689
    Member
    New

    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"
    #34497 quote
    Despair
    Blocked
    Master

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Strange problem recovering high/low


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Despair @despair Blocked
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Despair
8 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/03/2017
Status: Active
Attachments: No files
Logo Logo
Loading...