Pivot problems

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9804 quote
    verygrubby
    Participant
    Master

    Hello all,

    Im trying to trigger BUYs when the close of a candle is below the daily pivot AND the gap between the pivot is less than 30 points.

    Below is what I thought would do the trick – but Im seeing quite a few BUYs triggered above the pivot – any idea what I’ve done wrong?

    Many thanks, Geoff

     

    // Conditions to enter long positions
    indicator1 = close
    indicator2 = (DHigh(1) + DLow(1) + DClose(1))/3
    c1 = indicator1 < indicator2

    indicator10 = close
    indicator20 = (DHigh(1) + DLow(1) + DClose(1))/3
    c10 = (indicator20 – indicator10) <30

    IF c1 AND C10 THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF

    #9806 quote
    Nicolas
    Keymaster
    Master

    Hi, on which timeframe did you encounter the bugs?

    #9807 quote
    verygrubby
    Participant
    Master

    Im using the 1 min chart with the maximum history (11 months)

     

    Is a 1 min chart backtest unreliable?

    #9808 quote
    Nicolas
    Keymaster
    Master

    1 minute timeframe is reliable, no worries, I were just wondering if you were testing the strategy in daily timeframe..

    About the problem, this is strange since your c1 condition is quite strict. I’m not on computer now so I can’t reproduce your bug.

    Can you add a “GRAPH c1” at the end of the code and see what happen?

    #9809 quote
    verygrubby
    Participant
    Master

    still seeing the problem.. odd…

    #9811 quote
    Nicolas
    Keymaster
    Master

    Of course, the GRAPH instruction is here to debugging purpose only. You should see on your chart an oscillator between 0 and 1 showing you your c1 condition : 1 is true, 0 is false.
    Look at the documentation if you want to learn debugging all by yourself with this useful instruction😉

    #9812 quote
    verygrubby
    Participant
    Master

    is see… good tip, thanks…I’ll try to work out whats happening. Im new to this, so apologies for the basic questions…

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

Pivot problems


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
verygrubby @verygrubby Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by verygrubby
9 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/24/2016
Status: Active
Attachments: No files
Logo Logo
Loading...