fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. rafaelgrecco
    3. Posts
    R
    • Profile
    • Following 0
    • Followers 1
    • Topics 28
    • Posts 111
    • Best 7
    • Controversial 0
    • Groups 0

    Posts made by rafaelgrecco

    • RE: Modify Stop Loss and Trailing Stop Question

      Well, I might have expressed myself incorrectly.

      I understand what you said about changing the settings for each pair.

      But I want to change SL ONCE for each trade. When a trade is opened, it doesn't have any kind of SL or exit strategy, it just opens a trade.

      I want this EA to put a SL on each trade only once, when they are opened. And then follow the profit using trailing stop. Am I doing it wrong?

      Thanks for your time.

      posted in Questions & Answers
      R
      rafaelgrecco
    • Modify Stop Loss and Trailing Stop Question

      Hi! I have been using fxDreema for several years, but there is one thing I still don't understand correctly.

      I have an EA that open trades on all 54 pairs.

      I am trying to create a very simple EA here to handle SL. Here it is:

      https://fxdreema.com/shared/1XqaFTr8

      "on Trade" I try to put a SL (100 pips) on every opened trade
      "on Tick" I try to trail the SL of all trades on 100 pips distance.

      What I don't understand is:

      1. The SL is not fixed. It keeps appearing and disappearing on the chart and the journal keep saying (example): SL modified to 1.05453 then SL modified to 0.00000. It should be fixed, shouldn't it?

      2. Depending on the pair, the SL is vey different from each other. On some pairs the SL is -100 while on other pairs it can be -251, -367, -434, etc... seems kind of random.

      What's the best way to achieve what I am trying to do? I tried using "money" instead of "pips" but it doesn't seem to make a difference.

      Thanks!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How to open new trades when a trade is closed?

      Thanks man!!

      I kept trying to make it work "on tick", I didn't even think about using "on trade", that is exactly what I need!

      Yeah, the results on Demo account are actually really great using this simple strategy. The only problem is when there is a long and strong tendency. I need to make some adjustments, like finding the optimal SL and a strategy to close less profitable trades on the right occasions.

      Best regards!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: How to open new trades when a trade is closed?

      Hi!

      I have made some complex EAs using FXDreema but now I am trying to make a simple one and can't figure out how to make it work...

      I am trying to make a EA where everytime a trade is closed (regardless of type or how it was closed) I want the EA to open two new trades, one Buy and one Sell, up to a limit of 20 opened trades.

      I tried a lot of ways but it always end up opening 20 trades at once (like this last try: https://fxdreema.com/shared/2Qxkao6I).

      It should work like this:

      At first one Buy and one Sell is opened. As soon as a trade is closed, for example Sell reaches TakeProfit, a new Buy and Sell is opened.
      Now I have 3 trades. next time a TP / SL is reached, a new Buy and Sell is opened. Now I should have 4 opened trades... etc.

      Can you help me? Thanks

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Where do I start?

      You have to put your EA inside

      C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\038983A63A5CE68161CBF3B0C5B3FC6A**\MQL4\Experts**

      Then restart MT4 and EA is ready for use.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Stop Loss EA

      Hi,

      I am trying to make a very simple EA to control SL of all my trades.

      I have trades being opened by EAs, signals and manually. Some of this trades does not have a SL or it is too big.

      I want to have one EA running that checks all my running trades on any market and if a trade have a loss of more than U$20,00, that specific trade is closed.

      I tried it this way: https://fxdreema.com/shared/vVPToy24e, but it doesn't work. How should I do it?

      Thanks.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Delete pending orders issue

      What I like to do is use Variables to control stuff like this.

      Create a Variable "STOPLOSS" with value "0".

      Then you use pink blocks "For Each Closed Position" -> "Check How it Was Closed" and then the gray block "Modify Variables" to change your variable to "1".

      So when a trade is closed as a Stop Loss, your Variable "STOPLOSS" that was "0" is now "1". This is your Flag.

      Then you can have another set of blocks like a simple "Pass" -> "Condition" -> "Delete pending orders", where you check if you variable "STOPLOSS" is "1", if it is, your pending orders are deleted. Then you connect another "Modify Variable" after "Delete pending orders" to change your "STOPLOSS" back to "0", so you reset your logic.

      It sounds kind of complicated, but after you get the hang of if, you can do a LOT of stuff using this strategy. Here is a quick example:

      https://fxdreema.com/shared/2vqEYLMte

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Slide Order

      EDIT: Hey, I am editing this post because the results I posted below is not very consistent.... it varies a lot. Overall, it is working.
      Maybe on a real account the results will be better (I am currently testing on Demo account). Thanks for all your help!!

      Hey,

      I think I figured out what is going on. As I said previously, in Brazil, buy/sell orders can only be made on the hundreds: 100 lots, 200 lots, 300 lots, etc.

      I have the block "Trailing pending orders" using the minimum step of 1 PIP.

      When my EA place a buy/sell order of 200 lots (the minimum I use), each modify order happens at a pace of 2 cents.

      When my EA place a buy/sell order of 300 lots, each modify order happens at a pace of 3 cents.

      Etc... 400 lots -> 4 cents step, 500 lots -> 5 cents steps.

      While it is not optimal, it is working. It is not optimal because the higher the lots, the more volatile the price is.

      I calculate my trades on a base of $10.000. If the price of a stock is $50 my order will contain 200 lots, if the price is $20 my order will contain 500 lots.

      If I am in a trade with 500 lots and each "modify order" happens at a pace of 5 cents, it means $25 money for me (5 cents x 500). And $25 is a huge step. On lower lots, like 200, each "modify order" happens at a pace of 2 cents and it means $4 money (2 cents x 200) which is more acceptable.

      Do you understand what I am saying? If yes, do you think there is a way to make those "modify orders" shorter? Maybe based on real money (cents) instead of PIPs...

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Slide Order

      Thanks for the fast reply and all the extra tips!

      I configured Blocks 11 and 21 (which checks Spread) this way because of this infomartion that I see on MT5:

      spread.jpg

      The Spread shows 3.00, which means 3 cents in Brazilian Real. I do my trades at morning when the Spread can get really high, so I want trades to happen only when Spread <= 5 cents. I was using the same metric as I see on MT5 screen, but I was wondering why it wasn't working. I'll try to change value to <= 0.05 to see if it works.

      Thanks for the tip on chancing block positions for faster backtesting! I'll change them so the indicator will only be checked if the values comparison pass the condition!

      Now talking about the problem with Trailing Pending Orders.... I did the same test as you (using your edited strategy to place buy/sell regardless of conditions) and it seems to be working... but I think there is something a little strange. I think it has to do with PIPs Steps (trailing distance steps).

      I don't know if you noticed but I avoid using PIPs in any condition or formula in my EA. Where I do trades, Brazil, everytime I tried to use PIPs I got very strange results.

      Here we don't use to work with PIPs. The smallest amount of money is 1 cent, which I believe it is 1 PIP? I am not sure, but I know that depending on the amout of lots I buy/sell, the value of each PIP changes. The minimum we can trade is lots of 100 (200, 300, etc). Depending on the stock price, I usually buy from 200 to 500 or 600 lots and the EA get diferent results...

      If I could use another kind of "Trailing distance Step", like amount of money (per x cents) it would work better. Do you think something like that is possible?

      If you have any interest, I can give you access to a demo account.

      Thanks!

      ......
      spread.jpg

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Slide Order

      Hi,

      I am using the block that you recommended, but it is not trailing the orders, I am not sure what is wrong.

      Please take a look at my current EA: https://fxdreema.com/shared/844mUl5Hd

      I want my Pending Orders to trail the price at a distance of 0,3% of Market Price.

      I calculate 0,3% using block "81" (Formula) then I use that value on block "91" (Trailing pending orders), but orders doesnt't move.

      On block "91" I tried using "Custom (price fraction)" and "Custom (level)" but had the same results.

      What could be wrong?

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Slide Order

      Thank you very much, that's exactly what I was looking for.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Again on Trailing stop...

      GiovanniBumbo,

      In my EA I do the same thing that you are trying to do (move SL do open price after X profit) but I use the "Break even point" block. It does exactly that and works perfectly.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Slide Order

      Hi,

      I am trying to use Slide Order block but I am not sure I am doing it right. The picture below is what I want to do:

      1- Candle/Price is above indicator -> Sell Pending Order with SL - OK! (The opposite for Buy)
      2- Candle/Price rises, the Pending Order and SL should follow it - Doesn't work, but I can do it manually on MT5
      3- Candle/Price descend, reaches Sell Pending Order and the Sell is done -OK!

      [attachment=0:2x64nb9i]https://fxdreema.com/shared/SfmjlpR3d

      How to use Slide Orders properly?

      Thanks!

      ......
      slide order.png

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: New bug

      It seems to be working!!

      Thanks!

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: New bug

      Hi,

      Have you updated fxdreema on the last couple days? It probably broke something.

      I noticed something wrong because I was making some changes to my EA and it was not working. I decided to recompile my current (working) EA without making any changes and it also don't work anymore.

      To resume what I am saying, this is how I tested it:

      1- I made a EA last week
      2- I compiled it and it was working
      3- Without making any changes to the EA, I recompiled it today and it does not work.

      I believe the problem has something to do with money management or something, even though I don't use any blocks that control it:

      Backtest results of the EA that was compiled last week:
      working.png

      BackBacktest results of the same EA, without any changes, that was compiled today:
      notworking.png

      ......
      working.png
      notworking.png

      posted in Bug Reports
      R
      rafaelgrecco
    • RE: Stop Loss - Dynamic Level (Price Input)

      Well, it didn't work. I had very strange results.

      I'll think about something else...

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Stop Loss - Dynamic Level (Price Input)

      Hi, thanks for the explanation.

      My trades usually happen on periods of high volatily, so probably that is what is hapening.

      I am thinking about setting up a SL after the position is open, so I don't have this kind of problem.

      I will buy/sell with no SL. Then I use the block "modify stop" below a "once per positions" block to apply a SL based on the position that is already running.

      I'll see if it works. I'll posts results tomorow. If you have a better idea (or if you notice a flaw in my way of thinking) please let me know.

      Thank you for all the help so far.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Stop Loss - Dynamic Level (Price Input)

      Hi,

      I don't have those logs anynore, I migrated my MT5 to a virtual server this weekend so I only have logs starting today.

      Well, today it happened again:

      *2016.03.14 10:04:16 PCAR4 sell 200.00 48.37 0.00 Short position
      2016.03.14 10:25:27 PCAR4 buy 200.00 47.31 212.00 Position #18389902 closed
      %(#FF0000)[While I had a gain in this trade, the SL was too short.]
      LOG:
      2016.03.14 10:18:47.747 Trades '50424729': deal #15893951 sell 200.00 PCAR4 at 48.37 done (based on order #18389902)
      2016.03.14 10:18:47.544 Trades '50424729': exchange sell 200.00 PCAR4 at market sl: 48.49
      SL should be registered as 48.61 (0.5%), not 48.49.

      2016.03.14 10:05:53 BRKM5 sell 400.00 24.56 0.00 Short position
      2016.03.14 10:06:00 BRKM5 buy 400.00 24.88 -128.00 [sl 24.61]
      %(#FF0000)[In this case, SL was too long, it should be 24.68]
      LOG:
      2016.03.14 10:20:24.888 Trades '50424729': deal #15894085 sell 400.00 BRKM5 at 24.56 done (based on order #18390056)
      2016.03.14 10:20:24.372 Trades '50424729': exchange sell 400.00 BRKM5 at market sl: 24.61
      The strage thing is that it registers a smaller SL (24.61) but executes a longer one (24.88), while the correct should be 24.68. Is this slippage fault? Is there a way to "limit" it?

      2016.03.14 10:19:27 BRFS3 buy 200.00 52.06 0.00 Long position
      2016.03.14 12:07:57 BRFS3 sell 200.00 52.81 150.00 Position #18391881 closed
      %(#00BF00)[In this case I had a gain and the SL was correct.]
      LOG:
      2016.03.14 10:33:58.669 Trades '50424729': deal #15895675 buy 200.00 BRFS3 at 52.06 done (based on order #18391881)
      2016.03.14 10:33:58.466 Trades '50424729': exchange buy 200.00 BRFS3 at market sl: 51.80
      SL was 51.80 (0.5%).

      2016.03.14 10:20:14 SMLE3 buy 300.00 38.23 0.00 Long position
      2016.03.14 10:20:27 SMLE3 sell 300.00 38.11 -36.00 [sl 38.16]
      %(#FF0000)[Here the SL was too short, it should be 38.04 (0.5%)]
      LOG:
      2016.03.14 10:34:45.606 Trades '50424729': deal #15895768 buy 300.00 SMLE3 at 38.23 done (based on order #18391988)
      2016.03.14 10:34:45.419 Trades '50424729': exchange buy 300.00 SMLE3 at market sl: 38.16 *

      Is there a better way to control SL? I would like to control the maximum loss, but more importantly, I don't want SL to be too short because it really affects my strategy.

      Thank you for your help.

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Stop Loss - Dynamic Level (Price Input)

      Hi,

      On buy and sell positions I am using Stop Loss - Dynamic Level (Price Input) to close the trade at 0.5% loss, as shown in the example below:

      https://fxdreema.com/shared/PSuUbzN2b

      I works perfectly on backtest and is mostly alright on live testing, but on several ocasions the SL is too short, it does not obey the rules.

      Check out today's report:

      *2016.03.10 10:04:53 TOTS3 sell 300.00 33.34 0.00 Short position
      2016.03.10 10:05:20 TOTS3 buy 300.00 33.64 -90.00 [sl 33.49]
      Sell at 33.34, stop loss as 0.5% should be 33.51

      2016.03.10 10:06:01 CTIP3 sell 300.00 40.39 0.00 Short position
      2016.03.10 10:57:37 CTIP3 buy 300.00 39.65 222.00 Position #18254748 closed

      2016.03.10 10:06:01 SMLE3 sell 300.00 38.61 0.00 Short position
      2016.03.10 10:33:02 SMLE3 buy 300.00 38.62 -3.00 [sl 38.62]
      Sell at 38.61, stop loss as 0.5% should be 38.80

      2016.03.10 10:06:10 HYPE3 sell 400.00 26.88 0.00 Short position
      2016.03.10 10:08:25 HYPE3 buy 400.00 26.95 -28.00 [sl 26.94]
      Sell at 26.88, stop loss as 0.5% should be 27.01

      2016.03.10 10:11:23 BBAS3 sell 500.00 20.85 0.00 Short position
      2016.03.10 10:14:36 BBAS3 buy 500.00 20.95 -50.00 [sl 20.95]
      Sell at 20.85, stop loss as 0.5% should be 20.95 - CORRECT

      2016.03.10 10:13:01 SULA11 sell 500.00 18.41 0.00 Short position
      2016.03.10 10:25:13 SULA11 buy 500.00 18.14 135.00 Position #18255920 closed

      2016.03.10 10:15:10 HYPE3 sell 400.00 26.94 0.00 Short position
      2016.03.10 11:28:56 HYPE3 buy 400.00 26.46 192.00 Position #18256295 closed

      2016.03.10 10:15:51 TOTS3 sell 300.00 33.36 0.00 Short position
      2016.03.10 10:16:41 TOTS3 buy 300.00 33.42 -18.00 [sl 33.41]
      Sell at 33.36, stop loss as 0.5% should be 33.53

      2016.03.10 10:17:24 PCAR4 sell 200.00 47.99 0.00 Short position
      2016.03.10 11:41:10 PCAR4 buy 200.00 47.17 164.00 Position #18256547 closed

      2016.03.10 10:19:20 BRKM5 sell 400.00 24.56 0.00 Short position
      2016.03.10 11:28:14 BRKM5 buy 400.00 24.11 180.00 Position #18256944 closed

      2016.03.10 10:26:40 FIBR3 buy 300.00 31.43 0.00 Long position
      2016.03.10 10:29:34 FIBR3 sell 300.00 31.27 -48.00 [sl 31.29]
      Buy at 31.43, stop loss as 0.5% should be 31.27 - CORRECT*

      Do you know why this happens? The same rules, different results.

      Is there a better way to configure SL if I want a 0.5% of position value as SL?

      Thanks!

      posted in Questions & Answers
      R
      rafaelgrecco
    • RE: Condition: Market Properties: Backtest vs Live

      Hi, thank you for your help.

      That is not necessarly what I was looking for. With your strategy, the position would only open after the candle is closed, and the closed price can be very far from highest or lowest price.

      I´ll try some other ways.

      Thanks anyway!

      posted in Questions & Answers
      R
      rafaelgrecco
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 5 / 6