หน้าแรก ตัวชี้วัดทางเทคนิค โพสต์

ทำความรู้จัก NonLagAMA: เครื่องมือช่วยเทรดที่คุณไม่ควรพลาด

ไฟล์แนบ
8605.zip (1.36 KB, ดาวน์โหลด 0 ครั้ง)

สวัสดีครับเพื่อนๆ นักเทรดทุกคน วันนี้เราจะมาทำความรู้จักกับ NonLagAMA หรือ Non-Lag Adaptive Moving Average ที่เป็นเครื่องมือช่วยในการวิเคราะห์กราฟราคาที่น่าสนใจมากๆ

NonLagAMA คืออะไร?

NonLagAMA เป็นเครื่องมือที่ช่วยให้เราสามารถติดตามแนวโน้มของราคาได้อย่างแม่นยำ โดยไม่ต้องมีการดีเลย์มากเหมือนกับ Moving Average แบบเดิม ทำให้เราเห็นสัญญาณการซื้อหรือขายได้เร็วขึ้น

การตั้งค่าต่างๆ ใน NonLagAMA

  • Price: ตัวเลือกที่ใช้ในการคำนวณค่า MA
  • Length: ระยะเวลาที่ใช้ในการคำนวณ
  • Displace: การเลื่อนค่าของ MA
  • Filter: ตัวกรองสำหรับการลดการสั่นสะเทือน
  • Color: สีของเส้น MA
  • ColorBarBack: สีของพื้นหลัง
  • Deviation: ค่าความเบี่ยงเบน

โค้ดตัวอย่างของ NonLagAMA

โค้ดที่ใช้ในการสร้าง NonLagAMA บนแพลตฟอร์ม MetaTrader 4 จะมีลักษณะดังนี้:

//+------------------------------------------------------------------+\n//| NonLagAMA.mq4 |\n//| Copyright © 2008, MetaQuotes Software Corp. |\n//| https://www.metaquotes.net/ |\n//+------------------------------------------------------------------+\n#property copyright "Copyright © 2008, MetaQuotes Software Corp."\n#property link "https://www.metaquotes.net/"\n#property indicator_chart_window\n#property indicator_buffers 3\n#property indicator_color1 Yellow\n#property indicator_width1 2\n#property indicator_color2 RoyalBlue\n#property indicator_width2 2\n#property indicator_color3 Red\n#property indicator_width3 2\n//---- input parameters\nextern int Price =0;\nextern int Length =25;\nextern int Displace =0;\nextern int Filter =0;\nextern int Color =1;\nextern int ColorBarBack =2;\nextern double Deviation =0;\n//----\ndouble Cycle= 4;\n//---- indicator buffers\ndouble MABuffer[];\ndouble UpBuffer[];\ndouble DnBuffer[];\ndouble price[];\ndouble trend[];\n//+------------------------------------------------------------------+\n//| Custom indicator initialization function |\n//+------------------------------------------------------------------+\nint init() {\n    int ft=0;\n    string short_name;\n    IndicatorBuffers(5);\n    SetIndexStyle(0,DRAW_LINE);\n    SetIndexBuffer(0,MABuffer);\n    SetIndexStyle(1,DRAW_LINE);\n    SetIndexBuffer(1,UpBuffer);\n    SetIndexStyle(2,DRAW_LINE);\n    SetIndexBuffer(2,DnBuffer);\n    SetIndexBuffer(3,price);\n    SetIndexBuffer(4,trend);\n    IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));\n    SetIndexArrow(0,159);\n    SetIndexArrow(1,159);\n    SetIndexArrow(2,159);\n    SetIndexArrow(3,159);\n    short_name="NonLagAma("+Length+")";\n    IndicatorShortName(short_name);\n    SetIndexLabel(0,"NLD");\n    SetIndexLabel(1,"Up");\n    SetIndexLabel(2,"Dn");\n    SetIndexShift(0,Displace);\n    SetIndexShift(1,Displace);\n    SetIndexShift(2,Displace);\n    SetIndexDrawBegin(0,Length*Cycle+Length);\n    SetIndexDrawBegin(1,Length*Cycle+Length);\n    SetIndexDrawBegin(2,Length*Cycle+Length);\n    return(0);\n} //+------------------------------------------------------------------+\n

สรุป

การใช้ NonLagAMA ช่วยให้เราสามารถวิเคราะห์ตลาดได้อย่างมีประสิทธิภาพมากยิ่งขึ้น หากเพื่อนๆ มีคำถามหรือข้อสงสัยเกี่ยวกับการใช้งาน สามารถแสดงความคิดเห็นได้ด้านล่างเลยนะครับ!

โพสต์ที่เกี่ยวข้อง

ความคิดเห็น (0)