• Information
5+ years
experience
3
products
21
demo versions
0
jobs
0
signals
0
subscribers
My personal website has various trading products—most are free.
https://www.garot.com/trading/

I've started an MQL5 tutorial to build a working strategy using MT5 from scratch.
https://www.garot.com/trading/videos.php

MQL5 only—I do not use MQL4.

I prefer Geany to MetaEditor.

I don't accept friend requests unless I recognize you as being a contributor in the forum. :-|
Anthony Garot
Published code Rapid Doji EA
The Rapid Doji EA is a fully functional MetaTrader 5 Expert Advisor that uses pending orders (one BUY and one STOP) around each Doji candlestick on the Daily (PERIOD_D1) time frame. This is a great introduction to how to build a simple, profitable EA. You can watch, step-by-step, how this EA was built via YouTube videos. See the link in the code for details.
Anthony Garot
Added topic CodeBase Validation tester says [Invalid volume].
The volume is a fixed value of 0.10. Searching the forum suggests that [Invalid volume] is usually because of an issue with SYMBOL_VOLUME_MIN or SYMBOL_VOLUME_MAX or SYMBOL_VOLUME_STEP , but 0.10 is fixed, and I think a fairly standard size for
Anthony Garot
Added topic Jamming a very large long into a double
ChartID() returns a long. In general, it seems to be a rather large number. When I put it into a double, e.g. into a Global Variable of the Client Terminal, it gets changed due to loss of precision. So . . . I was thinking . . . I don't really need
Anthony Garot
Added topic Determine if three doubles have the same sign
Here's what I have so far, and it works, at least it seems to. Is there a better way to do this? Also not 100% sure of the 0 condition. I'm interested in any commentary that generates an interesting, more efficient, and/or more elegant function in
Anthony Garot
Added topic Lot value calculation off by a factor of 100
Scenario: 2 separate brokers who both have a NASDAQ100 index. When I calculate Lot value in USD (base currency), Broker 2 is 100X greater than Broker 1. The Calculation: double GetLotValue( string symbol, const double lotSize, double &
Anthony Garot
Added topic MQL5 - "pointer to this function type is not supported yet"
I'm guessing the error message means exactly what it says. Can anyone suggest a clean work-around? #property strict typedef bool (*SignalFn)( void ); // Global function definitions bool IsBuySignal() { return true ; } bool IsSellSignal() { return
Anthony Garot
Added topic MQL5 Templates - Saving a template w/ EA also saves <objects>
This is only a minor annoyance. Steps: Start with a "clean" chart. That is, just bars, no other indicators. Start EA with a dialog on it created from CAppDialog. This EA has labels, edits, buttons, etc. Save as Template. For some reason, the labels
Anthony Garot Published product

This Utility tells you the volatility of any symbol for any of the major time frames. As trades occur, the volume increases for each period. When each period ends, the bucket is reset to 0. Volumes are sorted from largest to smallest within each shown period. Click any symbol to highlight that symbol in all period columns. Volume information is specific to transactions placed at your broker. To test in the Tester, set the following: EURUSD,M1,1 minute OHLC 2018.01.01 to 2018.01.02 (a day’s worth

Anthony Garot
Added topic MQL5 Indicators - indicator_type property must be specified
Just double checking. It appears that I can change any of the parameters dynamically, e.g. width, color, style, label, but I must have the indicator type as a compiler directive property, which does not ever change, e.g. #property indicator_type1
Anthony Garot
Added topic MQL5: CopyTickVolume() returns same value for H1,H4,D1 for volume of current uncompleted bar
Here's a test script that depicts this odd behavior. The documentation says: If you need to return value corresponding to the current uncompleted bar, you can use the first form of call specifying start_pos =0 and count =1. Note: when I pull the
Anthony Garot
Added topic MQL5 - CArray sorts only once
This isn't really a question per se. It's more of a comment on something that tripped me up for a bit. I found a work around, but maybe you can comment on a better work around. So, CArray has a Sort() method that looks like this: void CArray::Sort(
Anthony Garot
Added topic MT5 - ChartApplyTemplate() applies template, but EA's auto-trading is disabled
From a pushbutton on a chart, I open a new chart: long newChart = ChartOpen (pair, PERIOD_D1 ); then apply a template (which is defined with an EA on it): if ( ! ChartApplyTemplate (newChart,InpTemplateName) ) {
Anthony Garot
Added topic MQL5 - Is there a way to remove an indicator from the chart using it's handle?
I want to add/remove (toggle) an indicator using a CButton button from a CAppDialog. Let's say the indicator is Donchian Channels, which I use iCustom() to load. Adding the indicator is trivial. I simply use iCustom() to get the handle then use
Anthony Garot
Added topic MQL5 - ChartScreenShot() - Save to FILE_COMMON area?
From the documentation it appears that ChartScreenShot() only saves to \MQL5\Files\ directory, not \MetaQuotes\Terminal\Common\Files\ directory. So, I am just double checking that there is no way to save into the latter using some sort of option like
Anthony Garot
Added topic Docking - Request for Comment
I tested out the ability to dock/undock windows. I had a few thoughts I wanted to suggest to see if they made sense; then I will post on the Russian side as a feature request. 1. As far as I can tell, there is no way to look at the tabs on the main
Anthony Garot
Added topic MQL5 Indicator - Is there an easy way to hide the 0th value?
As shown in the red box, the 0th value is the current value. I only want to show values for full D1 bars, not the currently filling bar. As you can see, I am currently setting HistoBuffer[0] = 0., which causes all the lines to converge to 0. One
Anthony Garot
Added topic iBarShift() for MT5 is klunky
iBarShift() sometimes works , sometimes does not. By "works" I mean that it returns a bar number given a specific time for historical data that I know exists on the machine. By "not works" I mean that it returns -1 even though historical data exists
Anthony Garot
Added topic Attention Service Desk - Documentation Typo Found
https://www.mql5.com/en/docs/constants/environment_state/mql5_programm_info MQL 5 _PROGRAM_PATH should be MQL_PROGRAM_PATH
Anthony Garot
Added topic MT5 - Multi-Currency Indicator in Tester
I have an indicator that pulls from eight different currency pairs . Into this indicator I have code that ensures historical data for all pairs is available. If the code is not available, it will pull the data from the broker. So far, nothing out of
Anthony Garot
Published code Optimal F for MQL5 (per Ralph Vince)
This calculates Optimal f using the Geometric Mean. Per Ralph Vince, "In trading we can count on our wins being for varying amounts and our losses being for varying amounts. Therefore the Kelly formulas could not give us the correct optimal f." So, using his equation(s), I created this library for the Geometric Mean version of Optimal f.
12