i need help with ZIGZAG ea code.

 

Hello pros,

i am trying to code an EA based on ZigZag indicator, but i need help on how to write the buy and sell instruction.

I like it to place a buy order immediately the ZigZag line moves in upward trend, and open a sell order as soon as the ZigZag line moves in downward direction.

Any assistance on this will be highly appreciated. Thanks.

Yemi.

 

Files:
 

 

zigzagsinyal is indicators

ZigzagAlSatEA.mq4 is EA

no work strategy.

 
Mehmet wrote >>

zigzagsinyal is indicators

ZigzagAlSatEA.mq4 is EA

no work strategy.

thanks Mehmet for your helpful reply,to my request,but what do you mean by "no work strategy"?

 
Mehmet wrote >>

Hi Mehmet

I tried to download the zigzag indicator and the Ea, I compiled both and let run the ea on eur/usd h1 . It did enter any order, I got blank result.

Can you explain what's I did wrong

Cheers

Fabio

 

addd chart ZigzagSinyal.mq4 (indicators) and ZigzagAlSatEA.mq4 (Expert) H1


 
Mehmet:

addd chart ZigzagSinyal.mq4 (indicators) and ZigzagAlSatEA.mq4 (Expert) H1



Is there a simple way to have the price displayed instead of the blue/red dots at zigzag turning points? (This would be using the ZigzagSinyal indicator) ...


I would like the SYMBOL_LEFTPRICE arrow to be used in place of the dots but my MQL4 programming skills are minimal. I've played with the code a bit but can't make the price labels to appear instead of the colored dots.


Any advice/hints would be very appreciated! Thanks ...

 
11011980:

Hello pros,

i am trying to code an EA based on ZigZag indicator, but i need help on how to write the buy and sell instruction.

I like it to place a buy order immediately the ZigZag line moves in upward trend, and open a sell order as soon as the ZigZag line moves in downward direction.

Any assistance on this will be highly appreciated. Thanks.

Yemi.

Unfortunately, you can't use the ZigZag for that. The lines you see are after the event - which looks perfect.


The thing is ZigZag redraws the lines when new ticks comes in. It doesn't draw a line every time - it only draws when it finds two suitable points. In theory, you should do the opposite - when you see an upline you should sell because the next line is likely to be a downline but there are no guarantees because an upline could be redrawn to go even higher.

 
Mehmet:


Thank You Mehmet,


I know it was 3 years ago you posted your EA. I hope u will

reply me.


I have been looking for an EA using ZigZag indicator, and

I found yours. Thank u again, I have questions here.

HedefKar is ExtDepth ?
HedefZarar is ExtDeviation ?
where is the ExtBackStep ?

or where can I edit ExtBackStep ?


AND


How to edit these above values in your ZigZagSignal Indicator ??

 
you can also check fx1.net codelibrary for many different zigzag indicators..
Reason: