EA: PZ Day Trading

I sometimes like to go over the jobs on the MQL5 website and get some good ideas for an expert advisor. I saw an interesting EA strategy which uses PZ Day Trading Indicator.

You can read the job details here:


PZ Day Trading

Based on this, my EA has following settings/rules:

Expert Advisor Description:

Indicators used:

  • PZ Day trading (MinRange, MaxRange, HighLowFilter) can be configured in EA
  • EMA 1 Close (Period configured in EA)
  • EMA 2 Close (Period configured in EA)

Make sure EMA1 period is greater than EMA2.


  • PZ Day trading indicator signal

Position caclulation:

  • Lot size should be calculated using riskRatio var (1:riskRatio) risk:reward
    • Main lot size can be set in Abiroid_Forex_Common library
  • Support magic number
    • Can be set in Abiroid_Forex_Common library
  • You can also set the active hours for EA in Abiroid_Forex_Common library.
    • Make sure to set doTimeCheck to true. (Keep it false if you want EA to run at all times)
    • And then set StartTradingTimeGMT and EndTradingTimeGMT

Entry rules:-

  • Mandatory: SL equals the activation price +/- high/low of the PZ Day trading box + Extra N pips (slBuffer) + Spread
  • Mandatory: Signal is valid if calculated SL <= SL threshold (configured maxStopLoss settings)
  • Optional RuleA = Price must be above(for BUY)/below(for SELL) EMA1
  • Optional RuleB = Distance between EMA (EMA1 close) and EMA (EMA2 close) between minEMADiff and maxEMADiff
  • Optional RuleC = If EMA2 above EMA1 then do only BUY and EMA2 below then do only SELL

Trade execution (if rules met):-

  • open position with take profit 1:(tpSteps), managed as follows (e.g. if tpSteps is 3):
    • once TP1 hit close 1/3 of trade and move SL to BE
    • once TP2 hit move SL to TP1 price and close 1/2 of what left
    • leave the rest to TP3 or to return to TP1 level
  • stopOnNewSignal:
    • If false: Don’t count new signals if the current order still opened
    • If true: Then close current order and open a new one based on new signal and if all active rules are met

EA and Indicators Installation:

Just copy all directories in your MQL4 folder.


Abiroid.com_PZ_Day_Trading_EA (3198 downloads)



I haven’t had a chance to test this out much. Only tested it on EURUSD for different timeframes (minimum M15) with some really good results and a very low drawdown.

I would love it if you guys keep sending me any test results in the comments below. You might need to tweak the settings for different pairs. So please write to me about your settings and results. I’ll keep updating my post with all your grand results 🙂

Love and peace to all.

You may also like...

48 Responses

  1. Craig says:

    How long is your test result for?

    • Aura says:

      The result image graph is for the past 3 months. I have run longer tests with very good results but only on EURUSD. If you run more tests on different pairs or with different settings, please post the results here. I’d love to know how this EA works on different pairs.

  2. PKShma says:

    If I give job url from mql5 site do you write EA for free?

    • Aura says:

      If it feels like a good profitable strategy then ya sure. I’ll write the EA in my free time. Let me know.

        • Aura says:

          I looked into it. It turns out that all the files: EA_Zone_Reversal.mq4 and EA_Trend_Laser.mq4 and EA_Razor_Scalper.mq4
          are using “\\Market\\PipFinite_Zone_Reversal” and “\\Market\\PipFinite_Razor_Scalper” and “\\Market\\PipFinite_Trend_Laser” indicators. These are paid indicators. If you have the ex4 files let me know. Don’t share it here or you might get banned by PipFinite. Send it in an email to: [email protected] I’ll code the EA and email it to you.

  3. JJ says:

    Test result for: EURUSD 15-min year 2018

  4. Denis says:

    Is it possible to get a SET file with adviser settings like in your test?

  5. Denis says:

    Is it possible to get a SET file with adviser settings like in your test?

  6. MOHAMED says:


  7. Yashvi says:

    Hi Aura, you are very kind and helpful..
    I would like to test your EA.. will see the result.

  8. Fernando Filipe says:

    Hi Aura,

    First of all thank youk you for your EA, i will test it…
    Have you thinked in using the indicator fxr_sr_zones_3.12 to filter when to enter trades with paz day trader ? I analyse and i think it works very well …
    I have a strategy that needs an EA, Can you make it? Can i send the strategy to your email.
    I bought Pipfinite Binary Options Indicator, but i can not use here in Europe because we can not use binary options on europe because of the regulation ESMA. If you want i can send to you.


    Best Regards,

    • Aura says:

      Hi Fernando. I’m glad you tried out the EA.
      I’ll try out fxr_sr_zones and see. I’m attaching fxr_sr_zones_3.11 ex4 for others to try it out as well.

      I think Pipfinite Binary Options is a subscription based indicator so probably will only work with your Metatrader account. I don’t want to get you blocked by trying it out.

      Actually there’s a new section here in Abiroid where you can post your EA ideas and we’ll try to code it in free time: https://abiroid.com/featured/ea-ideas

      • Fernando Filipe says:

        Thanks Aura for your effort.
        I send the last version of fxr_sr_zones in attach.
        I will put two strategies for EA’s on the link that you sent…
        I tech computer programming, but i never programed in MQ4, i would to lear with your codes and then help you … if you want…
        If you want the pipfinite i will send …


  9. mazn says:

    please someone tell me about ema moving averages period 🙏🙄

    • Abir Pathak says:

      Hi mazn
      Here is a guide about how EMAs are calculated:

      But I would suggest you read up about Moving Averages and Simple Moving Average first.

      Basically the lower the EMA period, the closer it will move with price and longer period will be farther away. And the overall distance between 2 EMAs with different periods can show you the trend direction or if a trend has ended. Also if distance is very small, means the trend isn’t very strong.

      Different forex pairs work well with different EMA settings. So for this EA, you can find best settings by trial and error using strategy tester. Make sure EMA1 period is greater than EMA2.

  10. jonisu says:

    Sound good EA, thanks abiroid. Do you have mt5 version?

  11. uyi sway says:

    Unfortunately this EA does not to work on my mt4, i tried to test it out on demo or am i missing something?

    I would really like some help out on this to make it work. Thanks in advance.

    You can kindly send me any update on this via my email: [email protected]

  12. long says:

    hello i have tried and don’t know if the installation has a fixed stop loss, can you help me, i don’t understand what the first items mean.

    • Abir Pathak says:

      This EA does not have a fixed Stop Loss.
      First time,
      Stop Loss is calculated where the arrow appears + slBuffer + spread

      slBuffer default value is 5 points. But you can change it to more to increase StopLoss distance.

      When Take Profit 1 is hit, StopLoss is then moved to starting price when your order started. When TP2 is hit, StopLoss moves to TP1 and so on.

      If you don’t want StopLoss to move comment out this code for both Buy and Sell:

      if(myOrderModify(currentTicket, StopLoss) == -1) {
      Print(“Can’t Modify: ” + (string)currentTicket + “: SL: ” + (string)StopLoss);

      If you want to set a fixed StopLoss then change it here:

      currentTicket = SendSellOrder(StopLoss, TakeProfit[tpSteps – 1], false);

      To whichever value you like. Do same for SendBuyOrder.

  13. long says:

    I have copied them into MQL4 but EA does not work when there is a signal, it is faulty

    • Abir Pathak says:

      After it gets an arrow signal from PZDayTrading there are a lot of Rules that the EA checks first before making a trade. Rule A, B, C, useTrend, etc. So maybe some condition isn’t being satisfied. So it’s not starting the trade.

      Please check the logs you see in Experts tab.

  14. Stilin says:

    How many pairs can trade at one time

  15. Stilin says:

    Koliki minimalan polog na računu da bi EA mogao raditi

  16. Stilin says:

    What is the minimum deposit on the account for EA to work

    • Abir says:

      That depends on your broker. You can set lot size in EA as you like. Check with your broker to see the leverage and the deposit to figure out your lot size.

      But please test the EA on a demo account first before live trading.

  17. Stilin says:

    Thank you for your reply

  18. Stilin says:

    Dear me, EA Day Trading can make you with the settings of PZ-mini range 2, PZ-maxi range 5 and do not add anything else from the indicator. Thank you in advance.

    • Abir says:

      You can change it directly in the code:
      extern int PZ_MinRange = 5;
      extern int PZ_MaxRange = 30;

      Or you can change it in the expert settings if you like.

  19. Pit says:

    Thanks for sharing your EA.
    It’s just great that there are people like you who make their programs available to the whole community.
    Many thanks.

  20. evanio says:

    Good afternoon.

    Thanks for sharing the EA. Can you put everything in one file (ea, library and indicator)?

    • Abir says:

      Actually I had separated the library because I use the same library for all my EAs. It’s just easier to manage code that way.
      And Indicator and EA can’t be combined. The Indicator PZ Day Trading is only ex4 compiled version. The actual code with mq4 is not available. It will only be with Point-zero’s website I guess 🙂

  21. Evanio says:

    Good afternoon.

    Thanks for sharing the EA. By chance you can code an EA with the following strategy, with Super Trend and the crossing of two EMAS:


  22. huu dinh Nguyen says:

    Hi, Thanks you by sharing Abiroid.
    What is Martingale in picture? And how to turn off?

  23. Omid says:

    Hello my friend
    Thank you for sharing EA. It’s a great.
    I tested it but not move stop loss and when i run it on two symbols just trading on of them.
    Please advise how to fix this problem.
    Thanks 🙏

    • Abir says:

      Running it on 2 different charts and same symbol, have you tried changing the Magic Number in Properties.
      Otherwise it won’t be able to place trades for the 2nd chart.

      I’m not really maintaining this code anymore. But I hope the magic number fixes your issue.

      • Omid says:

        I hope the magic number fixes this problem.
        Another problem is the stop loss not move, that’s mean when trade take tp1 not move stop loss to starting price and when take tp2 not move stop loss to tp1. What do you think is the problem?
        Thank you for your help

        • Abir says:

          Look into your journal logs.
          When a Take Profit is hit, the order modify happens. And it sets a new Take Profit and Stop Loss.
          If it’s not able to move the stop loss, it might be stop loss is too close to Spread and can’t be set.
          It will show you an error code in your Journal logs.
          If it is successful it will look like this:

Leave a Reply

Your email address will not be published. Required fields are marked *

The maximum upload file size: 5 MB.
You can upload: image, text, archive.
Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.

%d bloggers like this: