Reply

Need help with opening orders on Retrace-

6 replies

createMW

Subscriber, bbp_participant, 5 replies.

Visit profile

2 weeks ago #271117

Hello,

i’m new to algowizard, trying to achieve the following but does not seem to work, can anyone please help/advise ?

Buy Rules

On bar open :   (1)After EMA (5) cross over EMA (10) and

(2) EMA (10) cross over EMA (50)

and after the above 2 rules achieved, create buy order when the following rule is triggered

On on tick : the price retrace and touch the EMA (10) indicator line.

Sell Rules will be the opposite.

What I am trying to achieve is to buy/sell when the price retrace to touch the EMA (10) after both EMA (5) and EMA (10) cross over EMA (50).

I don’t know how to code the retrace part, can someone please help ? Much appreciated.

Attachment: emacrossoverretrace.sqx

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 679 replies.

Visit profile

2 weeks ago #271120

Hello,

do you need to have both crossover to happen at once?

If you are OK with EMA 5 to 10 cross while EMA 10 is above EMA 50 you can do this easily. Check the file attached

The entry order can be limit with validity set = 1 bar

Attachments:
You must be logged in to view attached files.

0

createMW

Subscriber, bbp_participant, 5 replies.

Visit profile

2 weeks ago #271127

Hello,

thank you for your quick reply and help!! much appreciated!

I would love to have both EMA 5 crossing EMA 50 and  EMA 10 crossing EMA 50, and then only triggered order (buy or sell) when the price retrace to touch the EMA 10.

Please see the photos attached with the EA attached.

2 problems I see

(1) It set a price limit at Price  Use Formulae EMA 10(1)   : but it didn’t triggered order when the price retrace back to touch the EMA 10 , Is it because it should be EMA 10 (0) instead since I want to buy on market price when the price touch the EMA 10 ?

(2) It does not triggered all buy/sell even though all rules are met .

I’m stucked, can you please advise ? thanks

 

Attachments:
You must be logged in to view attached files.

0

tomas262

Administrator, sq-ultimate, 679 replies.

Visit profile

2 weeks ago #271130

Hello,

yes you can use the shift= 0 to get the latest value of EMA 10 but the backtest need to be evaluated using high precision backtest tick by tick

As soon as the both EMA cross occurs how many bar would you wait for the EMA 10 touch?

0

createMW

Subscriber, bbp_participant, 5 replies.

Visit profile

2 weeks ago #271135

Hello,

I have changed EMA 10 (0)  as I wanted to buy/sell immediately as the price retrace to touch EMA 10 after both (1) EMA 10 cross EMA 50 and (2) EMA 10 cross EMA 50. As soon as both EMA cross occur, I would only want to wait for 10 bars for the price to touch EMA 10.  So I set the Bars Valid = 10,  is this correct?   The 10 bars is calculated after both EMA cross occur. If the price retraces and touches EMA 10 , for example, 15 bars after both EMA cross occur, then I would not want the buy/order to be triggered.  Am I correct with using Bars Valid = 10 function ?

(2) If you can kindly check the screenshot, the buy/sell is not right at the price touching the EMA 10.

(3) Also found that when I tested on MT4 on every tick model, it does not triggered on every crossover and price touches EMA 10 ? Is there something wrong with the code ? Or is it because I need to use even higher precision modelling such as tickstory ? (please see screenshot )

Thanks for your help ! Much appreciated!

Attachments:
You must be logged in to view attached files.

0

Jason

Customer, bbp_participant, 69 replies.

Visit profile

2 weeks ago #271132

This is a good video on how to use logic in Algo Wizard for retrace strategies. It doesn’t fit exactly your conditions exactly but its a very good insight for how to put these kind of algos together.

https://youtu.be/4U8NnYmL124

0

createMW

Subscriber, bbp_participant, 5 replies.

Visit profile

2 weeks ago #271140

thanks heaps. It’s really helpful

1

Viewing 7 posts - 1 through 7 (of 7 total)