Pivot problems
Forums › ProRealTime English forum › ProOrder support › Pivot problems
- This topic has 6 replies, 2 voices, and was last updated 8 years ago by
verygrubby.
-
-
06/24/2016 at 2:51 PM #9804
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 < indicator2indicator10 = close
indicator20 = (DHigh(1) + DLow(1) + DClose(1))/3
c10 = (indicator20 – indicator10) <30IF c1 AND C10 THEN
BUY 2 PERPOINT AT MARKET
ENDIF06/24/2016 at 3:26 PM #980606/24/2016 at 3:28 PM #9807Im using the 1 min chart with the maximum history (11 months)
Is a 1 min chart backtest unreliable?
06/24/2016 at 3:32 PM #98081 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?
06/24/2016 at 3:38 PM #9809still seeing the problem.. odd…
06/24/2016 at 3:42 PM #9811Of 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😉06/24/2016 at 3:43 PM #9812is see… good tip, thanks…I’ll try to work out whats happening. Im new to this, so apologies for the basic questions…
-
AuthorPosts