Reply

Generating signal with indicator sub-parameters

5 replies

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

10 years ago #111965

Hi,

I have been trying to do this for days and have been frustrated terribly by the EA Wizard.
I want to know how I can generate my signals based only on one or two parameters of my indicator. Take for instance that I want to buy when the volatility line is above the trade line and price line crosses below the trade line on the TDI (Traders Dynamic Index) indicator, how can I achieve this? Or does it mean that the EA Wizard is not able to use indicator sub-parameters to generate it’s signals? I don’t want to believe this. My strategy works this way and not when the complete indicator crosses either up or down.

Mark ….. PLEASE HELP ME OUT ON THIS ONE. I’M COMPLETELY STUCK!

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #123796

Hello,

 

I’m sure it is possible. If I understand it correctly your indicator draws two or more lines. And you want to have the signal when one of the lines crosses the other.

 

This is possible – every indicator that draws multiple lines has Output Value parameter, where you can choose value of which line to compare.

For example MACD has Main and Signal lines as output values.

 

So you can write a condition

IF MACD(…, Main) crosses above MACD(…, Signal)

THEN do something

Mark
StrategyQuant architect

0

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

10 years ago #123812

This is so sweet. Thanks a million Mark. Gosh …. you know I have been seeing the output values but never actually knew what they did. You are God sent Mark. I really cannot thank you enough …

0

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

10 years ago #123813

Ok, I have tried it. I made a simple EA that just reverses the trade when there is a reversal in the line crossing using the TDI. It is working but keeps showing a consistent error:

 

Traders_Dynamic_Index-mod_TC_01 EURAUDi,M15: unknown subwindow number -1 for ObjectCreate function
 
I dont know what that means. Is there a way for me to bypass this? Plus I also noticed that it is skipping a lot of the trades. When I do a visual backtest, I realize that it is skipping more than half the trades. I am thinking that the skipping of the trades has a lot to do with the error its showing in the strategy tester journal. But of course, I cannot say. You are the boss here.
 
Please advice me on what to do Mark.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #123846

Do you use some custom indicator?

 

This error means that some code calls ObjectCreate() function with incorrect parameter. I checked our EA code, it is all correct.

It cannot be code by EA Wizard, so it should be something else.

 

If you use custom indicators it could be one of them, I think the error says that it is indicator named Traders_Dynamic_Index-mod_TC_01

 

Could you post your strategy here? (mq4 file)

Mark
StrategyQuant architect

0

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

10 years ago #123882

I had to stop using the Traders_Dynamic_Index-mod_TC_01 indicator and used another TDI indicator and this one now works without giving the errors during back test as the previous one.

 

Still working on optimizing my EA for better results.

0

Viewing 5 replies - 1 through 5 (of 5 total)