Pips or points in EA tester

 

Hi all,

I noticed that the EA strategy tester (MQL5) Inputs tab lists the Stop Loss level and Take Profit level in points (see attached screenshot1.jpg file) but during testing I noticed that the calculations treat the value as pips, thus resulting in 10x difference in values considered. I am using a demo account that uses a broker with 5-digits in prices.  

Did anyone notice this before?

 

Many thanks,

Robert 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
Files:
screenshot1.jpg  65 kb
 

It depends on the EA you're testing. You should ask author of the EA why it behaves like that.
 
BTW, insert picture properly, it is convenient
MQL5.community - User Memo
  • 2010.02.25
  • MetaQuotes Software Corp.
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
alexey_petrov:

It depends on the EA you're testing. You should ask author of the EA why it behaves like that.

Hi Alexey,

I actually found this on the EA generated by MetaEditor itself. This is what I did:

  • I selected New File, used the "Expert Advisor (generate)" option in the MQL5 Wizard
  • Selected the "Accelerator Oscilator" signal (but any standard signal will do the same - I tried few of them with the same result)
  • Selected "Trailing stop not used"
  • Selected "Trading with fixed trade volume"
  • and clicked "Finish" to generate the code.
In fact the comment with this information is generated by MetaEditor, this is shown on the code snippet below:

 

//--- inputs for main signal
input int    Signal_ThresholdOpen =10;      // Signal threshold value to open [0...100]
input int    Signal_ThresholdClose=10;      // Signal threshold value to close [0...100]
input double Signal_PriceLevel    =0.0;     // Price level to execute a deal
input double Signal_StopLevel     =50.0;    // Stop Loss level (in points)
input double Signal_TakeLevel     =50.0;    // Take Profit level (in points)
input int    Signal_Expiration    =4;       // Expiration of pending orders (in bars)
input double Signal_AC_Weight     =1.0;     // Accelerator Oscillator Weight [0...1.0]

 

I also noticed that the SL calculation uses the function PriceLevelUnit() which returns 0.0001 for AUDUSD currency pair, thus indicating that the SL level is in PIPS. 

 Its not a big deal, but its a bit of a gotcha for people :-)

 

Many thanks,

Robert 

Accelerator Oscillator (AC)
  • votes: 21
  • 2010.01.06
  • MetaQuotes Software Corp. | English Russian Chinese Spanish Portuguese
  • www.mql5.com
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
Reason: