Pivot - All Levels

Maverick

Master Trader
Apr 3, 2014
453
6
79
Bournemouth UK
Been very pleased with these Pivot Points BUT have only recently noticed that the end labels don't stay on the end of the line - constantly move to the left as the day progresses ALSO they need refreshing at the start of a new day.

Which parts of the code do I need to look for to rectify and how ?

I think it MIGHT be this part . . . just guessing

MQL4:
           ObjectMove("Pivot", 0, Time[0], P);
           ObjectMove("Sup1", 0, Time[0], S1);
           ObjectMove("Res1", 0, Time[0], R1);
           ObjectMove("Sup2", 0, Time[0], S2);
           ObjectMove("Res2", 0, Time[0], R2);
           ObjectMove("Sup3", 0, Time[0], S3);
           ObjectMove("Res3", 0, Time[0], R3);
 

Attachments

  • pivots.mq4
    5.7 KB · Views: 10

Enivid

Administrator
Staff member
Nov 30, 2008
18,607
1,366
144
Odesa
www.earnforex.com
Been very pleased with these Pivot Points BUT have only recently noticed that the end labels don't stay on the end of the line - constantly move to the left as the day progresses ALSO they need refreshing at the start of a new day.

Which parts of the code do I need to look for to rectify and how ?

I think it MIGHT be this part . . . just guessing

MQL4:
           ObjectMove("Pivot", 0, Time[0], P);
           ObjectMove("Sup1", 0, Time[0], S1);
           ObjectMove("Res1", 0, Time[0], R1);
           ObjectMove("Sup2", 0, Time[0], S2);
           ObjectMove("Res2", 0, Time[0], R2);
           ObjectMove("Sup3", 0, Time[0], S3);
           ObjectMove("Res3", 0, Time[0], R3);

Just move those lines (150-156) below the curled bracket, which is currently on line 157.
 

Maverick

Master Trader
Apr 3, 2014
453
6
79
Bournemouth UK
I used to think it can't be at level 3 already ... can it ?
Wasn't until I tried reset that I realised it wasn't.

Will create screen shot when market opens for tomorrow
 

Maverick

Master Trader
Apr 3, 2014
453
6
79
Bournemouth UK
As best as I can tell at this stage ... No problem with currencies which are 24/5 ... However, Indices - at least the ones I trade close overnight and that could be the problem

PivotIndices_zpsiyavegk4.png


The image shows before and after I click on Reset
.