//+------------------------------------------------------------------+ //| Price_Action.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue //---- buffers extern int MA_Period=4; extern int MA_Mode=MODE_SMA; extern int MA_Price=PRICE_TYPICAL; extern int ATR_Period=4; extern double ATR_Multiplier=0.6; double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(1,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { for (int i=Bars-MA_Period;i>=0;i--){ ExtMapBuffer1[i]=EMPTY_VALUE; ExtMapBuffer2[i]=EMPTY_VALUE; double m=iMA(Symbol(),0,MA_Period,0,MA_Mode,MA_Price,i); double a=iATR(Symbol(),0,ATR_Period,i); if (Close[i]>m) ExtMapBuffer2[i]=m-a*ATR_Multiplier; if (Close[i] average(tp,3) then place a "Dot" at average(TP,3)-avgtruerange(10)*.33. This puts a dot below each bar as it trends up. If C< average(tp,3) then place a "Dot" at average(TP,3)+avgtruerange(10)*.33. This puts a dot above each bar as it trends down.*/