Daniel Castro
Daniel Castro
Rio de Janeiro
Daniel Castro
Added topic MT5 Stop Loss on Strategy Test not working as expected
After I write my code and put it to test I observed a strange behavior.  The Stop Loss works when running on demo account but when running Strategy Test it does not. The picture below shows the problem. [EDIT] The order was executed. 
Daniel Castro
Added topic Doubt - Calculate profits during a month for an EA
I read articles about it here at this forum, one in particular is this one ( https://www.mql5.com/en/forum/154009 ).  But so far it is not calculating as expected during Strategy Tester. My goal is to create a method to account the profits
Daniel Castro
Added topic Doubts - Hedging an Order with another
Hi, I am trying to figure out a way to write a MQL4 a kind of Hedging to compensate for an order that wen bad. I will detail. Order 1 - Buy EURUSD at 1.09310 with TP at 1.09331 (21 pips) with LotSize = 0.1.  This order backfires and the Virtual
Daniel Castro
Added topic Doubts about the behavior of High, Low - Need help
I am trying to implement a function that looks back a number of candles and then finds the local minimum price and the moment in time they happen. I am not sure if I understood correctly the behavior of iLow.  So my iteration may be wrong. If I
Daniel Castro
Added topic Code practices to isolate values from instances of my EA - Suggestions?
Hi guys, I am trying to write a EA that can be attached to multiple Charts.   My first try on Demo Account showed me that when I attach the EA on two pairs I get the values of my inputs variables shared among the 2 running EA. For example: I
Daniel Castro
Added topic Calculating Take Profit to get the double of the trade
I am trying to find something similar here in the forum but so far found nothing. My problem is to calculate a Take Profit that allow me to get what I traded so, if I risk US$ 100,00 (converted to the LOT SIZE and taking care of the Margin) on a
Daniel Castro
Registered at MQL5.community