MY EA DOES NOT EXECUTE PARABOLIC STOP AND REVERSE (PSAR) CODE ON FOREXTIME, BUT IT DOES ON INSTATRADER

 

EA CODE:

      double m1psar0=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,0),5);

      double m1psar1=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,1),5);

      double m1psar2=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,2),5);

      double m1psar3=NormalizeDouble(iSAR(0,PERIOD_M1,0.02,0.2,3),5);

      double m1open0=NormalizeDouble(iOpen(0,PERIOD_M1,0),5);

      double m1open1=NormalizeDouble(iOpen(0,PERIOD_M1,1),5);

      double m1open2=NormalizeDouble(iOpen(0,PERIOD_M1,2),5);

      double m1open3=NormalizeDouble(iOpen(0,PERIOD_M1,3),5);

 if( ( GetOrderCount17112(OP_BUY,17112)<1)   && (m1psar0<m1open0 && m1psar1>m1open1)                 ) OPBUY17112(); 


LINKS FOR CHARTS

https://www.mql5.com/en/charts/8907668/eurusd-m1-fxtm-ft-global

https://www.mql5.com/en/charts/8907681/audusd-m1-instaforex-group


ON FOREXTIME THE EA DID NOT EXECUTE IN THE 4 INSTANCES SHOWN (SEE CHART LINK ABOVE) BUT THE EA EXECUTES OTHER CODES AS CAN BE SE SEEN ON THE TRADE TERMINAL.

SO I DECIDED TO TEST THE SAME EA/CODE ON INSTATRADER AND THE CODE IS EXECUTED (SEE CHART LINK ABOVE).

GRATEFUL FOR YOUR HELP ON WHAT THE PROBLEM IS WITH THE FOREXTIME EA. (BY THE WAY I'M NEW TO MT4 CODING). THANKS.

Chart EURUSD, M1, 2018.07.16 14:39 UTC, FXTM FT Global Ltd., MetaTrader 4, Demo
Chart EURUSD, M1, 2018.07.16 14:39 UTC, FXTM FT Global Ltd., MetaTrader 4, Demo
  • www.mql5.com
Symbol: EURUSD. Periodicity: M1. Broker: FXTM FT Global Ltd.. Trading Platform: MetaTrader 4. Trading Mode: Demo. Date: 2018.07.16 14:39 UTC.
 
maxlifenow: ON FOREXTIME THE EA DID NOT EXECUTE IN THE 4 INSTANCES ...
  1. Don't SHOUT at us, that is RUDE.

  2. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your (original) post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  3. Please use the link button Use the link button See the difference? https://www.mql5.com/en/charts/8907668/eurusd-m1-fxtm-ft-global  https://www.mql5.com/en/charts/8907681/audusd-m1-instaforex-group
              Messages Editor

  4. Use the debugger or print out your variables, including _LastError and prices and find out why.

  5. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is usually wrong, as it is in this case.

  6. iSAR(0,PERIOD_M1,0.02,0.2,3)
    
    iOpen(0,PERIOD_M1,0),5); 
    Your code only works on the M1. Use PERIOD_CURRENT and can work on any timeframe.
  7. There is no symbol zero. Use _Symbol.
    • You can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, MarketInfo does not. OrderSend does not.
    • Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
Reason: