MA’s on the side

0
(0)
Nama:
MA's on the side
Pengarang: bdeyes (2011.09.27 14:06)
Dimuat turun: 2519
Muat turun:
MA's on the side 1
MA Segments.mq4 (37.7 Kb) Lihat

Penerangan:

Often times I find my chart is too cluttered with indicators to see the price action, however I still need those reference points.

My solution was to create an indicator which displays the current level of some of the MA's off to the side of the current candle.

Works on all time-frames except Weekly and Monthly. Can show MA's from other time-frames on current chart i.e. Setiap hari 10 EMA on 15 carta min. The indicator is attached, change it as you like. The code is commented well enough that I hope making changes should be fairly self-explanatory. (I have seen enough posts on here to know that everyone will probably want a different MA added - feel free to make you own changes.)

CATATAN: Ini adalah "upgrade" version of the indicator I erroneously placed in the Forum under the same title. Adds ability to toggle MA's on/off from the properties window and further internal commenting.

Gambar:

MA's on the side 2

4 komen Untuk menyiarkan ulasan baharu, tolonglah log masuk atau mendaftar

Thank you so much,

great idea !! it 's very useful !!

🙂

23.10.2011 12:13 ludo31

Will come back to look at this one as it is along the lines of something I want to do, iaitu; I want to be able to display MAV values no matter what time frame I'm in - like show the daily200MAV and the 1hr200mav even if I'm in say the 5 carta min

Will come back t it as I'm searching for something else atm........

12.10.2011 18:13 CanAm

good idee bad indicator
30.09.2011 17:05 wansiman


Man I love you guys.

I put in the original post that I didn't want to make MA changes for you, cause there's only like about a million different MA's combinations in MetaTrader (I'm sure I'm going to hear about that - I'm know someone on here has probably actually counted).

The post has been up less than a day and I have already had 3 requests for different MA's

Here's how you change the MA's - if you can type you can do this.

Open the mq4 file of the indicator in MetaEditor

Save the file under another name i.e. MA_Segments v2

Change the highlighted parts to match the MA you want to use. Replace the timeframe (PERIOD_D1) with one of these http://docs.mql4.com/constants/timeframes Replace the period (200) with whatever number you want. Replace the MA Method (MODE_SMA) with the one you want http://docs.mql4.com/constants/movings (Don't mess up the commas)

Change the red part of the variables to match your MA using this format MA_Timeframe_Period_MA Method

Change the green object names the same as you did the variables above. Note that the line and the label each have a name. (Don't mess up the double quotes)

Change the label text to match your MA.

Don't forget to change your komen juga.

Click on Compile.

 

terima kasih,

dave

PS: Now you're a programer too!!!

 

 

 

 

The variables are at the top...

extern bool MA_D1_200_SMA = true; // set true to display

These are further down...

int deinit()
{
    ObjectDelete("D1_200_SMA");

        }        

    // Setiap hari 200 SMA barisan Change your comments too
    jika (MA_D1_200_SMA) // draw if true
    {
    // if there is an old line delete it...
    jika (ObjectFind("D1_200_SMA") != -1) ObjectDelete("D1_200_SMA");
    // and draw a new one.
    ObjectCreate("D1_200_SMA", OBJ_TREND, 0, Masa[0]+line_leader, iMA(NULL, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0), (Masa[0]+line_length+line_adjustment), iMA(NULL, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0));
    ObjectSet("D1_200_SMA", OBJPROP_RAY, salah);
    ObjectSet("D1_200_SMA", OBJPROP_TIME1, Masa[0]+line_leader);
    ObjectSet("D1_200_SMA", OBJPROP_TIME2, (Masa[0]+line_length+line_adjustment));
    ObjectSet("D1_200_SMA", OBJPROP_COLOR, Lime);
    }

    // Setiap hari 200 SMA text label Change your comments too
    jika (MA_D1_200_SMA) // draw if true
    {
    // if there is an old label delete it...
    jika (ObjectFind("D1_200_SMA_label") != -1) ObjectDelete("D1_200_SMA_label");
    // and draw new one.
    ObjectCreate("D1_200_SMA_label", OBJ_TEXT, 0, (Masa[0]+text_shift+text_adjustment), iMA(NULL, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0));
    ObjectSet("D1_200_SMA_label", OBJPROP_TIME1, (Masa[0]+text_shift+text_adjustment));
    ObjectSet("D1_200_SMA_label", OBJPROP_COLOR, Lime);
    ObjectSetText("D1_200_SMA_label", "D1 200 SMA", font_size, "Arial", Lime); 
    }

Betapa bergunanya siaran ini?

Klik pada bintang untuk menilainya!

Penilaian purata 0 / 5. Kiraan undi: 0

Tiada undi setakat ini! Jadilah yang pertama menilai siaran ini.

Kami memohon maaf kerana siaran ini tidak berguna untuk anda!

Mari kita perbaiki siaran ini!

Beritahu kami cara kami boleh menambah baik siaran ini?



Pengarang: Pasukan Wiki Forex
Kami adalah pasukan Pedagang Forex yang sangat berpengalaman [2000-2023] yang berdedikasi untuk menjalani kehidupan dengan syarat kita sendiri. Objektif utama kami adalah untuk mencapai kebebasan dan kebebasan kewangan, dan kami telah meneruskan pendidikan kendiri dan memperoleh pengalaman yang luas dalam pasaran Forex sebagai cara kami untuk mencapai gaya hidup mampan diri.