Reply

Trigger, If order Exists and Insert Arrows.

3 replies

pjonz2008

Subscriber, bbp_participant, community, 2 replies.

Visit profile

11 years ago #110929

Hi,

New EA Wizard user here with 4 easy questions.

1. My strategy uses a stochastic cross as a trigger – I then wait for momentum indicator and 2 moving averages before entering the trade. How can I keep the trigger as true until the other criteria become true?

A cross of the stochastic in the oposite direction cancels trigger. Any ideas?

2. I'm didnt get this answer from your tutorial documentation but how do i prevent the EA from entering the same trade multiple times while criteria remain true?

3. Can I insert an arrow or price tag in the ea while testing to identify entry points?

4. can I program for every tick AND once per bar monitoring. eg I only want to check the previous bar when every new bar opens for entries but for SL, TP and TS I want to check every tick.

Can you answer these questions for me?

Thanks

Pjonz2008

0

stearno

Customer, bbp_participant, community, 379 replies.

Visit profile

11 years ago #121068

[color=#282828][font=helvetica, arial, sans-serif]Pjonz2008,[/font][/color]

[b]For Question 1: [/b]
You cannot use a “buffer” to hold a value until other conditions are met in EA Wizard. All the conditions in the rule have to be met for a trigger to occur at the same time.

So to do this you would need to define how many bars you are willing to wait after the stochastic crosses for that cross to still be valid. So Stochastics crosses and Mom and 2 MA’s meet the conditions 10 bars later. Would that still be a valid signal? Some people would say 10 bars is too long as Stochastic could change its position dramatically in those 10 bars. So first have to decide how many bars after the Stochastic cross are you willing to wait for a valid signal from the Mom indicator and 2 MA’s.

Let us say 3 bars you will wait. (maybe the answer is 5 bars….this is up to you). So in this example it is 3 bars. Then you will have to put the 3 stoch cross conditions. One with a Shift 1, one with a Shift 2, and one with a Shift 3 with an OR in between each rule so only one condition has to be met at one time. Can change the Shift (in case you did not know) here:

So now have a rule saying that IF the Stoch crosses either this past bar (Shift 1) or the bar before (Shift 2) or 2 bars before (Shift 3), THEN….

Then add your Mom Indicator statements and 2 MA’s.

If the Mom or MA could happen as well on different bars, then will need to do the same thing with each indicator using the shift and OR statement.

[b]Question 2[/b]
Easy way to do this is add a condition in the Condition Dialog box under Strategy Control of Order Position. Choose the magic number or variable you setup for the magic number and then choose on the right side “Flat.” So this condition is saying that it can only open an order if there is no other order under this magic number.

File: flat.jpgflat.jpg

[b]Question 3[/b]
Right now Arrows and that type of functionality is not available within the same EA. What I did do though to solve this problem, was I export not as an EA, but export it as a Signal Indicator for MT4. Then, put this on your chart and it will show little boxes when conditions are met in a rule.

[b]Question 4[/b]
I will have to leave this up to Mark as I don’t know how to run rules each Tick, and I have not found this option available in the application…only per bar.

Hope this helps.

-Stearno

0

pjonz2008

Subscriber, bbp_participant, community, 2 replies.

Visit profile

11 years ago #121076

Thanks Stearno, much appreciated

pjonz2008

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

11 years ago #121088

Stearno thanks for replying instead of me, this is what this forum should be about – to help each other.

 

4. can I program for every tick AND once per bar monitoring. eg I only want to check the previous bar when every new bar opens for entries but for SL, TP and TS I want to check every tick.

 

yes, if you specify SL, TP and TS in order it is checked on every tick, even if you use IS Bar Open function in your conditions.

 

regards,

 

Mark

Mark
StrategyQuant architect

0

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