Download MetaTrader 5
To add comments, please log in or register
Have you published a program in the Market? Place it in your blog as well - the widget will help!
Patrik
5
Patrik 2015.10.20 19:18 

Hey Folks,

I just started with Mql4 and built my first few EAs, so this is prob a stupid question for the "Pros" but I would be very pleased if you can tell what I miss here.

 So i built an EA based on Bollinger Bands, nothing special and he fails pretty bad, so I thought why not just turn everything around, everytime I selled I buy now and I also switched the SLs and TP from 10SL & 20TP to 20SL and 10TP, and i though the graph should basically now be a mirrorimage to my previous strategy just to the postivie side, but it also failed miserably and i kinda dont get why.

EA Code :

 if(OrdersTotal() == 0) 

     {  

            if(iBands(Symbol(), 0, 20, 2, 0, PRICE_LOW, MODE_LOWER, 0)>Low[1])

              {

                  buyOrder = OrderSend(Symbol(), OP_BUY, 1, Ask, 6, Bid - 100 * Point, Ask + 200 * Point, "My buy order", 1377, 0, clrLime);

              }

            else if(iBands(Symbol(), 0, 20, 2, 0, PRICE_HIGH, MODE_HIGH, 0)<High[1])

              {

                  sellOrder = OrderSend(Symbol(), OP_SELL, 1, Bid, 6, Ask + 100 * Point, Bid - 200 * Point, "My sell order", 1337, 0, clrRed);      

              }  

Result:

 

 

Switched Version Code:

if(OrdersTotal() == 0)

     {  

            if(iBands(Symbol(), 0, 20, 2, 0, PRICE_LOW, MODE_LOWER, 0)>Low[1])

              {

                  sellOrder = OrderSend(Symbol(), OP_SELL, 1, Bid, 6, Ask + 200 * Point, Bid - 100 * Point, "My sell order", 1337, 0, clrRed);      

              }

            else if(iBands(Symbol(), 0, 20, 2, 0, PRICE_HIGH, MODE_HIGH, 0)<High[1])

              {

                  buyOrder = OrderSend(Symbol(), OP_BUY, 1, Ask, 6, Bid - 200 * Point, Ask + 100 * Point, "My buy order", 1377, 0, clrLime);    

              } 

Result:

 

whroeder1
13619
whroeder1 2015.10.21 11:37  
mimzee: i though the graph should basically now be a mirrorimage to my previous strategy just to the postivie side, but it also failed miserably and i kinda dont get why.
If it was that easy, then any strategy could be a winner.
  1. You pay the spread/commissions either way
  2. Your limited SL can still be hit.
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
/
To add comments, please log in or register