Forums › ProRealTime English forum › ProOrder support › Automated trading with Pivot Points and Dojis › Reply To: Automated trading with Pivot Points and Dojis
05/14/2018 at 11:39 PM
#70436
You don’t have to say sorry:) Yes it is the DAX, and you where right about sunday. Now I change the code to this and the pivot lines for mondays are align with those within the chart:) Thank you so much!!!
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
DEFPARAM CumulateOrders = false DEFPARAM FlatBefore = 000000 DEFPARAM FlatAfter = 234500 if OpenDayOfWeek = 1 then Pivot = (DHigh(2) + DLow(2) + DClose(2)) / 3 R1 = 2*Pivot - DLow(2) S1 = 2*Pivot - DHigh(2) rR2 = Pivot + (DHigh(2) - DLow(2)) S2 = Pivot - (DHigh(2) - DLow(2)) R3 = R1 + (DHigh(2) - DLow(2)) S3 = S1 - (DHigh(2) - DLow(2)) endif if OpenDayOfWeek = 2 then Pivot = (DHigh(1) + DLow(1) + DClose(1)) / 3 R1 = 2*Pivot - DLow(1) S1 = 2*Pivot - DHigh(1) rR2 = Pivot + (DHigh(1) - DLow(1)) S2 = Pivot - (DHigh(1) - DLow(1)) R3 = R1 + (DHigh(1) - DLow(1)) S3 = S1 - (DHigh(1) - DLow(1)) endif if OpenDayOfWeek = 3 then Pivot = (DHigh(1) + DLow(1) + DClose(1)) / 3 R1 = 2*Pivot - DLow(1) S1 = 2*Pivot - DHigh(1) rR2 = Pivot + (DHigh(1) - DLow(1)) S2 = Pivot - (DHigh(1) - DLow(1)) R3 = R1 + (DHigh(1) - DLow(1)) S3 = S1 - (DHigh(1) - DLow(1)) endif if OpenDayOfWeek = 4 then Pivot = (DHigh(1) + DLow(1) + DClose(1)) / 3 R1 = 2*Pivot - DLow(1) S1 = 2*Pivot - DHigh(1) rR2 = Pivot + (DHigh(1) - DLow(1)) S2 = Pivot - (DHigh(1) - DLow(1)) R3 = R1 + (DHigh(1) - DLow(1)) S3 = S1 - (DHigh(1) - DLow(1)) endif if OpenDayOfWeek = 5 then Pivot = (DHigh(1) + DLow(1) + DClose(1)) / 3 R1 = 2*Pivot - DLow(1) S1 = 2*Pivot - DHigh(1) rR2 = Pivot + (DHigh(1) - DLow(1)) S2 = Pivot - (DHigh(1) - DLow(1)) R3 = R1 + (DHigh(1) - DLow(1)) S3 = S1 - (DHigh(1) - DLow(1)) endif |