|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
objects: set time zero+- X distance
basically - how to shift lable on macd to the right?
-it don't wanna go easy way... ![]() ... string objname=WindowExpertName()+","+Symbol()+","+Period (); if(ObjectFind(objname)<0) ObjectCreate(objname,OBJ_TEXT, WindowFind(WindowExpertName()+" ("+FastEMA+","+SlowEMA+","+SignalSMA+")"), Time[0]+Period()*60,MacdBuffer[0]/2); else ObjectMove(objname,0,Time[0]+Period()*60,MacdBuffer[0]/2); if(pips!=0) ObjectSetText(objname,DoubleToStr(pips,0),FontSize ,"Courier",FontColor); else ObjectSetText(objname," ",FontSize,"Courier",FontColor); Last edited by fxbs : 02-20-2008 at 05:48 PM. |
|
|||
|
again, thank you everybody who helped - that's what i find out:
"When setting time (moving an object) to the right, use this function int customTime(int a) { if(a<0) return(Time[0]+Period()*60*MathAbs(a)); else return(Time[a]); } if you call it with - argument (say customTime(-5)) you are going to get FUTURE time and your object is going to be shifted to the right". Last edited by fxbs : 02-28-2008 at 09:24 AM. |
|
|||
|
Quote:
{ if(a<0) return(Time[0]-Period()*60*a); else return(Time[a]); } |
|
|||
|
Thank you, Michel!
I'll try! let me show how it was done with indi above: before: PHP Code:
PHP Code:
Last edited by fxbs : 02-28-2008 at 09:25 AM. |
|
|||
|
yepp, thank you, Michel!
so overall shift formula will be: PHP Code:
Last edited by fxbs : 02-28-2008 at 02:05 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Distance until retrace indicator. | sprtn | Indicators - Metatrader 4 | 0 | 07-26-2007 11:36 PM |
| Objects events kicking off scripts | Pervaz | Setup Questions | 1 | 07-24-2007 06:20 PM |
| Distance trading | traderforex777 | Tools and utilities | 7 | 05-15-2007 11:38 PM |
| Too much distance from real price in Open Orders | echnaton | Metatrader 4 | 2 | 02-25-2007 11:05 AM |
| Question about objects on an EA | thn5625 | Metatrader 4 | 2 | 01-30-2007 06:49 PM |