Make EA to emit trading signals for testing - how to

To add comments, please log in or register
ranxero
68
ranxero  

hello

I'm rather new to MT4 and programming EAs so maybe this approach is all wrong :)

I have writeen an EA that displays up/down arrows at possible entry points for buys and sells, without triggering actual buys/sells.

It is using some of the indicators' values to achieve this. This works fine. 

My question is: how can I test this advisor with the strategy tester

I read the docs about signals but as far as I understand I can only set/get properties to already existing signals.

I don't want my EA to automatically place orders, just to indicate possible entry points.

Can this be (back-)tested with the strategy tester at all?

if yes, can someone please einlighten me? 

if no, how can I otherwise back-test this advisor?

Thanks in advance


Code2219 or probably 2319
441
Code2219 or probably 2319  
ranxero:

hello

I'm rather new to MT4 and programming EAs so maybe this approach is all wrong :)

I have writeen an EA that displays up/down arrows at possible entry points for buys and sells, without triggering actual buys/sells.

It is using some of the indicators' values to achieve this. This works fine. 

My question is: how can I test this advisor with the strategy tester

I read the docs about signals but as far as I understand I can only set/get properties to already existing signals.

I don't want my EA to automatically place orders, just to indicate possible entry points.

Can this be (back-)tested with the strategy tester at all?

if yes, can someone please einlighten me? 

if no, how can I otherwise back-test this advisor?

Thanks in advance


if the EA is not trading, then it's just an indicator.
why backtest ? backtest is to assess profitability of an EA that trades.

you can use your namely EA (which is actually an indicator) and see if the arrows are signalling good trades or not, by scrolling back your chart, while the indicator is active. (assuming it does not repaint)

converting the indicator to a trader EA, needs to add more features to code, most importantly ,Money management, risk management, and many trade-related stuff

Keith Watford
Moderator
15102
Keith Watford  

I have writeen an EA that displays up/down arrows at possible entry points for buys and sells, without triggering actual buys/sells.

If it displays arrows on a live chart, then it will display arrows in the strategy tester.

I don't understand your problem.

ranxero
68
ranxero  

Thanks a lot Code2219 or probably 2319 and Keith Watford

for clearing this up for me.

@Keith Watford  you're right, there isn't a problem really. I wasn't aware that the tester is not necessarily relying on some orders,

but just running the EA/indicator along the time.

I just checked and the result is as wanted -> displaying arrows along time

@Code2219 or probably 2319

could you elaborate a bit more on when to use an EA rather than an indicator?

I so far only found that when using asynchronous methods, like for instance calling a remote url via WebRequest, this can only be done

within an EA as indicators do not allow asynchronous calls.

Code2219 or probably 2319
441
Code2219 or probably 2319  

ranxero:


@Code2219 or probably 2319

could you elaborate a bit more on when to use an EA rather than an indicator?

I so far only found that when using asynchronous methods, like for instance calling a remote url via WebRequest, this can only be done

within an EA as indicators do not allow asynchronous calls.

Indicators if used on their own, are supposed to help you see things better/faster/more precise on price chart. that's all.
example : instead of calculating (mentally/on paper/using a calculator) the rate of price change in last N bars, you could simply use an oscillator indicator and set it up to your parameters.
an indicator can be as simple as MovingAverage, or a volume indicator, or as complex and advanced as the one that considers many other factors and tries to SHOW you a good trade entry.

Expert advisors, are by nature, made to do the trading operations on your behalf. so they need to find trade opportunities , qualify them, do some calculations,etc.... then TRADE.
expert advisors usually use indicator readings to find the signals and confirm entries... SO expert can/should use indicators values or may calculate what indicators calculate, in their code.

both can be backtested, but expert are backtested to see how profitable they can be.
indicators are backtested to see how they do their job. (show you something about price chart).

SO, the program you call an expert that only pinpoints trade entries for you to see and decide to enter a trade or not, is basically an indicator, not an expert.

P.S , there are reasons for function call limitations of each program type. (EA, indicator,...).
supposedly, if programs are made based on the indicator/expert definition I tried to give, those limitation should not limit your program do the job it's meant to do.

ranxero
68
ranxero  

@Code2219 or probably 2319

thank you very much for this comprehensive explanation.

I was a bit confused as there seems to be not much difference regarding implementation between EA and indicators, besides the described limitations.

so it's more a matter of the actual use case whether to decide for an EA or indicator. 


happy trading :)


To add comments, please log in or register