Hi friends
here is a code for pop up alert.
problem is many popups keep coming.
can a expert suggest a way out please!
//==================================================
_SECTION_BEGIN("POPUP");//pop up alert
Buy=MACD()>SIGNAL();
SELL = MACD()<SIGNAL();
PlotShapes( IIf( Buy, shapeDownArrow + shapePositionAbove, shapeNone ), colorGreen );
PopupWindow("Buy : " + FullName(),"Alert", 5, 640*mtRandom(), 480*mtRandom());
PlotShapes( IIf( Sell, shapeUpArrow + shapePositionAbove, shapeNone ), colorRed );
PopupWindow("Sell : " + FullName(),"Alert", 5, 640*mtRandom(), 480*mtRandom());
_SECTION_END();
========================
Once this code lines are added to an afl,after removing buy,sell code lines, it will give popups.
but there are multiple popups allover the chart.
I am looking for just a single buy or sell alert from one chart where the afl has the above code lines.
thanks in advance
regards
here is a code for pop up alert.
problem is many popups keep coming.
can a expert suggest a way out please!
//==================================================
_SECTION_BEGIN("POPUP");//pop up alert
Buy=MACD()>SIGNAL();
SELL = MACD()<SIGNAL();
PlotShapes( IIf( Buy, shapeDownArrow + shapePositionAbove, shapeNone ), colorGreen );
PopupWindow("Buy : " + FullName(),"Alert", 5, 640*mtRandom(), 480*mtRandom());
PlotShapes( IIf( Sell, shapeUpArrow + shapePositionAbove, shapeNone ), colorRed );
PopupWindow("Sell : " + FullName(),"Alert", 5, 640*mtRandom(), 480*mtRandom());
_SECTION_END();
========================
Once this code lines are added to an afl,after removing buy,sell code lines, it will give popups.
but there are multiple popups allover the chart.
I am looking for just a single buy or sell alert from one chart where the afl has the above code lines.
thanks in advance
regards