Hi I have question about expert, how I could add option buy or sell or buy and sell. I saw this option on others experts but I would like give this posibbility to my expert. I mean standard expert where I can build in mt5 editor if you know what I mean for example I build expert with one indicator and compile. Now how add this option and just this to not change on tick or any extra lines just this option. Thanks
- Problems with buy/sell orders
- how i can to separate the sell quantity and the buy quantity separately ?
- Long Only or Short Only
dolasu: how I could add option buy or sell or buy and sell. … I mean standard expert…
- There is no such thing as a “standard expert”, each is unique.
- Do you know how to code? Then add it.
enum bsOption{bsoBuy, bsoSell, bsoBoth}; input bsOption directionEnabled=bsoBoth; ⋮ if( buySignal && directionEnabled != bsoSell) Buy(); if(sellSignal && directionEnabled != bsoBuy) Sell();
Ok so Ive tryied couple of thinks with new just one indicator from metaeditor and this first two
enum bsOption{bsoBuy, bsoSell, bsoBoth};
input bsOption directionEnabled=bsoBoth;
This is what I want to but this two
if( buySignal && directionEnabled != bsoSell) Buy();
if(sellSignal && directionEnabled != bsoBuy) Sell();
is error and Ive tryied put somewhere to compile but error every time. This first are fine but the same results on tester and when I add this with if is error....thx anyway if you know where to put this if tell me exacly I know some coding but by most time selflearning and not much know yet....
Files:
dolasu #: Ok so Ive tryied couple of thinks with new just one indicator from metaeditor and this first two
enum bsOption{bsoBuy, bsoSell, bsoBoth};
input bsOption directionEnabled=bsoBoth;
This is what I want to but this two
if( buySignal && directionEnabled != bsoSell) Buy();
if(sellSignal && directionEnabled != bsoBuy) Sell();
is error and Ive tryied put somewhere to compile but error every time. This first are fine but the same results on tester and when I add this with if is error....thx anyway if you know where to put this if tell me exacly I know some coding but by most time selflearning and not much know yet....
What William gave you was sample code that needs to be integrated properly, not just copy/pasted anywhere.
It needs to be placed in the correct places and with the appropriate adjustments to fit your code.
To do this, you need to understand how to code and how to adapt the sample code to your specific circumstances.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register