Rafael Caetano Pinto
Rafael Caetano Pinto
  • Information
7+ years
experience
7
products
89
demo versions
0
jobs
0
signals
0
subscribers
Programmer at Brazil
Rafael Caetano Pinto
Added topic OnTradeTransaction weirdnesses
I implemented a EA that uses OnTradeTransaction on stock markets. My intention was to remove the SLTP check from the OnTick function and improve the speed of my optimizations. Firstly I noticed that the events are extremely different among
Rafael Caetano Pinto
Added topic Deposit currency is changing automatically to USD
I work in Brazil, with the BRL currency. Since the currency field was added to test, this field is changing every time to USD. Its very annoying. This field only works when I set BRL in debug specified settings. There is some way to do it not change
Rafael Caetano Pinto
Added topic OnCalculate() bug? TickVolume returns 1 on OnCalculate()
My VWAP indicator stopped to work recently, after an update. I noticed that the volume_tick array returns 1 in the last iteration. In the next iteration the before values are right. I coded the follow indicator to show the problem: #property
Rafael Caetano Pinto Published product

30.00 USD

This indicator uses VWAP and projects this VWAP into up to 3 levels, shifted by a percentage of the chart's symbol. How to configure: Choose the symbol and desired graphic time Set the start time of the symbol (in bovespa, WIN and WDO start at 9 o'clock). This time is used as the cutoff reference for VWAP. Check which VWAP period fits the chart better: Ideally, a period when VWAP is not too distant from the chart Set percentage levels: Ideally, you should set levels based on history, so that

Rafael Caetano Pinto Published product

This indicator uses volume and volatility information to indicate the trend or to indicate the market reversion/correction. There are 2 indicators in one. The indicator works in two styles: values ​​per candle and accumulated values. Using the volume and volatility information, when well adjusted, this indicator has a good probability to indicate the right direction, both in lower (M1, M2, M5) and higher (M15, M30) timeframes. Strategy 1: Trend indicator Indicates the operation direction. To use

Rafael Caetano Pinto
Added topic Generic pointer to access subclass methods
I tried to use generic pointers to access the subclasses methods but I was unable to access the correct methods.  Can you help me to do it right? I expected the direct and indirect access with the same output. class Super { public :   
Rafael Caetano Pinto
Added topic How to hide/show a subwindow indicator in a EA?
My EA uses some indicators that open subwindows (volume, RSI, Bulls bears, etc). How can I hide these subwindow indicators? It is hard to see the candles with a lot of subwindows... Tks by advance
Rafael Caetano Pinto
Added topic PositionCloseBy not working in real accounts
My EA is operating with Buy/Sell Limit orders on hedge accounts. When the buy and sell positions are equals, the EA uses CTrade.PositionCloseBy() to close a buy position with a sell position with the same volume. This strategy works very well in the
Rafael Caetano Pinto
Added topic Best way to do a visual comparison between two EA's
I'm running two similar EA's on the same symbol in a demo account to compare the behavior between them. But it is very difficult to understand the visual comparison because the MT5 join the indications of trade of both EA's in the symbol graph
Rafael Caetano Pinto
Added topic hotkeys.ini
Anyone knows how to use the hotkeys.ini file? The doc says that I can use this file to customize my shortcuts, but I was unable to find any example about how I can do it. 
Rafael Caetano Pinto
Added topic Weird behavior on MQL5
I want a event that trigger always when a position is closed by SLTP. I found nothing native from MQL5 to do it, so I'm trying approaches to do myself an OnSLTP() function . A piece from my code to do it uses the history:     
Rafael Caetano Pinto
Added topic Can EA detect if it's in Test Strategy?
Is there any way to know if the EA is running on Strategy Tester ? My EA uses the symbolInfo.MarginMaintenance() to make some equations to trade but these values are zero in strategy tester. To work around this problem, I created a parameter to set
Rafael Caetano Pinto
Added topic Order price theshold and deviation points
I have a problem that only occurs in the real account: On WIN$D, I operate with ORDER_FILLING_IOC and deviation points = 15. The EA sent a buy order at 74,000, the order ended up buying at 74100. I imagined that point deviation was a parameter that
Rafael Caetano Pinto
Added topic MT5-EA in Production on cloud
I need to prepare a production environment to run EAs.  I would like these characteristics: Virtual machine on an cloud environment (google cloud or aws)  MT5 start and run some pre-configurated EA on windows startup.  Run several MT5
Rafael Caetano Pinto
Added topic Doubts about BuyLimit and BuyStop (pending operations)
I make a EA to learn how pending operations works. This EA create a buyLimit and a buyStop simultaneous.  When I run the code, both operations are triggered (by log) but the operations tab is pending and the log price values are wrong (the
Rafael Caetano Pinto
Added topic SYMBOL_BID and SYMBOL_ASK always returning zero
The SYMBOL_BID and SYMBOL_ASK are always returning zero. Did I something wrong? #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\AccountInfo.mqh> CTrade trade; CSymbolInfo symbolInfo; CAccountInfo
Rafael Caetano Pinto
Added topic MqlTick with no ask nor bid values
I'm running a EA on WDO$D and when I try to get ask or bid values, to open position, both are zero! The value variable is zero when I use SymbolInfoDouble and SymbolInfoTick.    double BuyPrice(){       
Rafael Caetano Pinto
Added topic Error 4756 (Invalid stops) on SL modify
I caught a 4756 error [Invalid stops], but I don't known that is happening here... There is a buy position at 3284.000 with SL 3269.000 . The current price is 3296.000 .  At this moment, I tried to set a new SL to 3284.020 and I got the error
Rafael Caetano Pinto
Added topic How to log ClosePosition cause (SL, TP, EA)?
I want to implement some way to log my OpenPositions, modifyPositions (SLTP changes) and closePositions (by EA or by SLTP) to generate some metrics.   So I read the docs: onTrade  and historySelect  to implement a code to print all
Rafael Caetano Pinto
Added topic How to known if a candle is down (red) or up (green)
I need to get if the candle is green or red programatically. I already tried to use MqlRates and MarketBookGet to recover this info, but with no success. Can you help me? 
123