Download MetaTrader 5

Open position with custom indicator?

To add comments, please log in or register
Find out how social trading can improve your profits
arcull
121
arcull 2014.11.04 08:04 

Hi there,

I wonder if it is possible to open position with custom indicator in MT5. I've created a trading "form" similar to "one click trading", but a bit advanced. Now when I try to open position with click on my button I get error 4752 "auto trading disabled by client". I have auto trading enabled in my terminal. Thanks for your help.

Stuart Browne
5817
Stuart Browne 2014.11.04 09:36  
arcull:

Hi there,

I wonder if it is possible to open position with custom indicator in MT5. I've created a trading "form" similar to "one click trading", but a bit advanced. Now when I try to open position with click on my button I get error 4752 "auto trading disabled by client". I have auto trading enabled in my terminal. Thanks for your help.

Hi

Indicators can't open trades, only EAs can. If you do have an EA and not an indicator, ensure auto trading is allowed in both the MT options and the EA options 

Irwan Adnan
886
Irwan Adnan 2014.11.04 11:28  
There is oneclicktrading EA on a broker other than default MT4 . It is an EA not indicator. So you need to change it to an EA or code your "advanced form" as an EA.
arcull
121
arcull 2014.11.04 13:37  
Thanks both. Actually I already have coded an EA, which I use for automatic trading, but this EA doesn't put any objects to the chart, it just trades according to my trade strategy. So if I understand correctly, I could reprogram my existing EA, which would create the "advanced trade form" on the chart using objects. Would that work? The second option is that my existing "advance form" on indicator creates files on disk, which would afterwards be read by my EA, and place trades according to the contents of the files. But this option doesn't look handy. How would you do it?
arcull
121
arcull 2014.11.04 18:37  
arcull:
Thanks both. Actually I already have coded an EA, which I use for automatic trading, but this EA doesn't put any objects to the chart, it just trades according to my trade strategy. So if I understand correctly, I could reprogram my existing EA, which would create the "advanced trade form" on the chart using objects. Would that work? The second option is that my existing "advance form" on indicator creates files on disk, which would afterwards be read by my EA, and place trades according to the contents of the files. But this option doesn't look handy. How would you do it?

I did it like this, changing a bit my existing EA: I've put code to generate the necessary objects for my advanced trade form on the OnInit event. Then I've added the OnChart event to the EA, like the one one indicators. And it works ok.

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
{
   if(id==CHARTEVENT_OBJECT_CLICK) {
      if (sparam == "BuyButton") {  
        // logic to place position...
      }
   } 
}
Irwan Adnan
886
Irwan Adnan 2014.11.05 12:33  
arcull:
........ The second option is that my existing "advance form" on indicator creates files on disk, which would afterwards be read by my EA, and place trades according to the contents of the files. But this option doesn't look handy. How would you do it?
use iCustom, maybe?
arcull
121
arcull 2014.11.05 20:38  
belido:
use iCustom, maybe?
Thanks I haven't thought of that option. But for now I'll stick to my current solution, as far as it works :)
moot
5
moot 2014.11.06 15:56  
try rojak keling. EA
To add comments, please log in or register