Download MetaTrader 5

help please -> two different buys in one EA

To add comments, please log in or register
csibiri_cse
15
csibiri_cse  

Hi, 

I'm asking a help or just a little hint, because I'm stuck a bit. I want to integrate 2 different buying/selling opportunity into one EA. They complement each other, since one is buying when the trend starts and the other one buys in ovebought levels. When I tried to build that , only one of them worked, however both of them were correct (both of them works separately).

My EA structure works like this:

direction TREND= Neutral;

if (blabla) TREND= UP;

else (blabla) TREND=DOWN;

...

...

if (TREND==UP);

blabla

..

OrderOpen


I've made 2 other options like      else if (blabla) TREND=UP2; /DOWN2; and the two corresponding OrderOpen sequence (mainly it was a copy-paste method), but these weren't working

My question would be that is there any special command where I have to change the number of the types of trades, or is it possible at all to make this kind of sequence?


thank you very much

wicha 

Yohana Parmi
3535
Yohana Parmi  
csibiri_cse:


I've made 2 other options like      else if (blabla) TREND=UP2; /DOWN2; and the two corresponding OrderOpen sequence (mainly it was a copy-paste method), but these weren't working

My question would be that is there any special command where I have to change the number of the types of trades, or is it possible at all to make this kind of sequence?


thank you very much

wicha 


Hi,

What's technical indicator you will use for your blabla ? ˙ ͜ʟ˙

csibiri_cse
15
csibiri_cse  
Yohana Parmi:

Hi,

What's technical indicator you will use for your blabla ? ˙ ͜ʟ˙


RSi and Bollinger Bands. LONG TRADES: The first one opens an order when MA of RSI is over 50, then it places an order to the BB line. The second places orders to a small SMA (6) when RSI is over 65. SHORT T. : vice versa. 

So the trades should be in line, since the circumstances at first one covers the rule of the second one 

Yohana Parmi
3535
Yohana Parmi  
csibiri_cse:

RSi and Bollinger Bands. LONG TRADES: The first one opens an order when MA of RSI is over 50, then it places an order to the BB line. The second places orders to a small SMA (6) when RSI is over 65. SHORT T. : vice versa. 

So the trades should be in line, since the circumstances at first one covers the rule of the second one 


I found some EAs that similar with your requirement here https://www.mql5.com/en/code/mt4/experts

Happy hunt there, good luck  ͡ᵔ ͜ʖ ͡ᵔ )

MQL5 Code Base: Experts
MQL5 Code Base: Experts
  • www.mql5.com
MQL4 Source Codes of Expert Advisors for MetaTrader 4
To add comments, please log in or register