DI+, DI- Indicator values for Brent Crude in ProReal Code different from chart

Forums ProRealTime English forum ProBuilder support DI+, DI- Indicator values for Brent Crude in ProReal Code different from chart

Viewing 4 posts - 1 through 4 (of 4 total)
  • #135736
    Hi All,

     

    =============================================================================
    Please can someone help me as to why the code above executes a buy of Brent Crude for the period of 10th June 07:05 to 07:07, when nearly all the DI+,DI minus timeframes are false from the charts but the backtest picks up the trade.

    I used the graph function to check the DI + and DI minus values within backtest.

    For 10th June 07:05:

    Chart values:
    5 mins DI+ 25.89869
    5 mins DI- 18.47363

    15 mins DI+ 20.96073
    15 mins DI- 22.66533

    30 mins DI+ 17.86417
    30 mins DI- 26.54380

    1hour DI+ 21.27028
    1hour DI- 25.51226

    Debug values of DI+ and DI- indicator values below using Graph functions
    5 mins DI+ 25.89869
    5 mins DI- 18.47363

    15 mins DI+ 20.96073
    15 mins DI- 22.66533

    30 mins DI+ 17.86417
    30 mins DI- 26.54380

    1hour DI+ 21.27028
    1hour DI- 25.51226
    Many thanks
    #135737

    Did you graph your condition?

    if it returns 0 (false), then a buy order is triggered.

    when nearly all the DI+,DI

    Not nearly, all of them must be false.

    #135741

    The initial problem was this code with DI+ and DI- on the 5min, 15 min, 30 min and 1hour  time frames was added to ignore a buy trade.  I noticed from the charts for the date and time that with the exception of  the 5mins time frame, the 15min, 30 min and 1hour time frames on the chart had their DI+ less than DI-, hence with the NOT (cc1 or cc2 or cc3 or cc4 ) condition, the trade shouldnt have been executed.

    Hence used the graph function to graph the cc1,cc2, cc3, cc4 initially and realised they were all false within pro real code and then decided to graph the indicator values themselves and realised the values from prorealcode were different from the chart in prorealtime, resulting in all of them being false, hence reason why backtesting was behaving same way as my Auto trader code.

    Hence my question is why the indicator value is very different from the chart ? Is there another syntax for DI+, DI minus Indicators?

    Many Thanks

    #135970

    You are not using “updateonclose”, so the values from your indicators are the ones intrabar and not the ones fixed at Close that you can see on your chart.

    Further explanation: First approach to multi timeframe trading with ProRealTime

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login