Download MetaTrader 5

Attaching a Custom Indicator in making my EA

To add comments, please log in or register
Nieco Pama
42
Nieco Pama  
Good day to everyone. I have an indicator here that shows arrows in my chart. If the arrows pointin up then i will buy and if the arrows pointing down then i will sell. I try to attach it in my EA but when i try it on the tester, when the arrow appears and pointing up...it Opens a multiple buy position. What codes i will add so that when the arrow appear it will open 1 trade in every arrow. 

Thank you in advance. I hope someone can help me to solve my problem. God Bless you all. 
Nedyalka Zhelyazkova
6690
Nedyalka Zhelyazkova  
Nieco Pama:
Good day to everyone. I have an indicator here that shows arrows in my chart. If the arrows pointin up then i will buy and if the arrows pointing down then i will sell. I try to attach it in my EA but when i try it on the tester, when the arrow appears and pointing up...it Opens a multiple buy position. What codes i will add so that when the arrow appear it will open 1 trade in every arrow. 

Thank you in advance. I hope someone can help me to solve my problem. God Bless you all. 

 if (IsNewCandle())
    {

What codes i will add so that when the arrow appear it will open 1 trade in every arrow.

     }


bool IsNewCandle()
{
   static int BarsOnChart=0;
    if (Bars == BarsOnChart)
    return (false);
    BarsOnChart = Bars;
    return(true);
}

Nieco Pama
42
Nieco Pama  
Nedyalka Zhelyazkova:

 if (IsNewCandle())
    {

What codes i will add so that when the arrow appear it will open 1 trade in every arrow.

     }


bool IsNewCandle()
{
   static int BarsOnChart=0;
    if (Bars == BarsOnChart)
    return (false);
    BarsOnChart = Bars;
    return(true);
}

Thank you very much for you being so generous with your knowledge. God Bless you more.

Nedyalka Zhelyazkova
6690
Nedyalka Zhelyazkova  
thank God Almighty, not me
To add comments, please log in or register