MQL4 - automated forex trading   /  

Forum

Looking for MA cross EA with more features

Back to topics list To post a new topic, please log in or register

avatar
89
edfiuza 2008.01.31 01:34 

The EA's available don't have SL, TS, TP, etc.

Where to find this simple EA with more features?

Thanks.
article

View of Technical Analysis in the Context of Automatic Control Systems (ACS), or "Reverse View"

The article demonstrates an alternative view of technical analysis, which is based on the principles of both the modern automatic control theory and technical analysis itself. It is an introductory article representing the theory with some practical applications of it.


avatar
1235
BarrowBoy 2008.01.31 14:54 

E

Make a copy of the MT4 'Moving Average' sample EA, add extern variables for SL & TP then add them to the OrderSend line, e.g.

ticket=OrderSend(strSymbol,OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point, strComment,iMagic,0,Green);

and

ticket=OrderSend(strSymbol,OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point, strComment,iMagic,0,Red);

IIRC, there is a Trailing Stop code example in the MACD Sample EA

Good luck :)

BB


avatar
189
edddim 2008.02.03 01:47 
Simple EA with Variable Lots Volume, One buy and sell per Bar, Trailing Stop, Stop Loss, Take Profit .
It is just a simple template.
You need to add your code/indicators for your strategy.
In the code base there are many more samples.
Attached files:
  TemplatevCustom.mq4 (4.34 KB)
Back to topics list  

To add comments, please log in or register