fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. roar
    3. Best
    • Profile
    • Following 0
    • Followers 184
    • Topics 35
    • Posts 2406
    • Best 422
    • Controversial 6
    • Groups 0

    Best posts made by roar

    • Easy way to make ENUM

      When searching the forum for ENUM declaration, some threads mention additional custom indicators or custom blocks. There is a simplier way too:

      • Make enum-type constant, put its values to curly brackets separated by comma.
      • Use that enum to create an input: Type must be the Name of 1st constant, Value must be some of the values inside the brackets.

      This method doesnt seem to allow for Descriptions, though...

      0_1677015953341_0a8985e7-c106-4a51-b4ab-5fcd98cec019-image.png
      0_1677015968623_a761d304-3b2e-4d79-9542-db3c2d350bd5-image.png

      posted in Tutorials by Users
      roar
      roar
    • "Close positions" when market is closed

      https://fxdreema.com/shared/bhBUBUChb

      While backtesting, close positions block will get stuck if market happens to be closed (or quotes-only mode).

      It appears the block is designed to break the loop by a fatal server response, but that doesnt help in backtest.

      As a workaround, using "For each position" -> "Close" loop works better.

      dc9f3c3f-8fc5-4799-8159-68b0483ddba4-image.png

      c1cca4f1-e762-4161-9a21-a355cf8b0302-image.png

      posted in Bug Reports
      roar
      roar
    • Here, take this profitable ea

      Last year (May 2017) I made some very simple ea based on bollinger bands and rsi. Today I backtested it again and surprisingly it would have worked the last year similar to the earlier years. This is not very common in backtesting - usually the bots fail after the period they are initially tested and developed on.

      Feel free to use this ea (as an example, start point, inspiration, what ever). Maybe you can even improve it.
      Note: this only works on a mt5 netting method account
      https://fxdreema.com/shared/pTIbLpWob

      0_1528134336412_Roar v1.0.ex5

      0_1528134269821_3c994f61-51da-49bc-adab-cf02bbd7ac15-image.png


      Update 30.12.2022: Bot seems to be working still, without any changes since 2017

      0_1672405015592_fe814329-5ac4-4031-94d8-a1be8fbac7bb-image.png


      Update 29.8.2023: Refactored the EA to work on modern hedging method mt5 accounts. Also simplified the strategy to what matters the most (theres lots of useless stuff in original version), in essence the strategy is this:

      • Build long/short positions with RSI
        - When above 70, sell
        - When below 30, buy
        - Before selling/buying another time, wait for the RSI to visit level 50
      • There must be a mechanism that favors closing the positions rather than letting long/short position grow bigger and bigger
        - Only allow the position to grow if price is above daily median (buy) or below median (sell)
        - Trades that shrink the total position don't have that rule, so positions naturally stay small
      • Lastly, limit the trading actions to more volatile half of the day by comparing fast and slow ATR values

      The reduced strategy is not quite as profitable as the original one, but still clearly on the black after 6700 trades. Feel free to add your ideas to this.

      https://fxdreema.com/shared/rCGHpDKod
      8e5a48c7-be90-46da-90c0-f4dc58f6fa05-image.png

      posted in Tutorials by Users
      roar
      roar
    • RE: Here, take this profitable ea

      Finally got around making the .ex4 version. I hope this will inspire someone to better develop their own systems.

      Please be careful if you use this, it is not very sophisticated even though it looks a mess!
      https://fxdreema.com/shared/aBHjbJjN
      0_1560891000683_Roar v1.1.ex4

      posted in Tutorials by Users
      roar
      roar
    • RE: place the year and month in variables

      @cesardefez

      variable1 = Year()
      variable2 = Month()

      https://docs.mql4.com/dateandtime/year

      posted in General Discussions
      roar
      roar
    • RE: Transformation of profit/loss into price level

      On every source code downloaded from fxdreema, there is a function called DynamicLots. Inside that function is an equation that calculates the lot size using a price distance (the SL) and a money value (% of equity).

      With some high school math, you can reverse that equation to calculate a price distance using the lot size and money value.
      @sktsec 's example appears to be about right 👍

      image.png

      posted in Questions & Answers
      roar
      roar
    • Plot MACD swings on chart

      Here's a nifty little framework for plotting the MACD swings (or OsMA swings to be precise) on the price chart, like zig zag. A starting point for a larger project of mine, thought I'd share this to anyone interested... 💁‍♂️

      https://fxdreema.com/shared/5YrnpeX9
      0_1614460632352_356bb579-f7ad-4cd9-ad65-a937c22dcb91-image.png

      posted in Tutorials by Users
      roar
      roar
    • RE: candles count

      iBarShift() is an important function that fxdreema should include in the drop-down menus.
      Here's the raw code:

      iBarShift(NULL, PERIOD_D1, D'2021.12.31 00:00') - iBarShift(NULL, PERIOD_D1, D'2021.01.01 00:00')

      posted in General Discussions
      roar
      roar
    • Tip: Avoiding lopsided optimizations

      When running a genetic optimization, sometimes the best results converge towards an inputs set that produces a very small number of very successful trades. This is usually a bad thing, because few very successful trades is statistically less reliable than a lot of semi-successful trades.

      To avoid this optimization problem, you can code a custom criterion that takes trade number into account, but if you are lazy like me, you can use a "handicap": create some extra blocks that make 100% bad trades -> now the optimization discards all results with too few trades, because those trades cannot offset the intentionally bad trades. Input sets that produce a lot of good trades will have the upper hand in optimization.

      Example of a simple handicap model:
      https://fxdreema.com/shared/Jdk6zDAtb

      posted in Tutorials by Users
      roar
      roar
    • Auto draw trendlines

      Mimicking the human eye and catching trendlines automatically has long been very interesting to me. Well, today I wrote something up to detect resistance-side trend lines. It seems promising, also my "scoring" system for each line seems to be in the right direction.

      I will put the indicator here for anyone interested to test it.
      Won't add the source yet, because its such an embarrassing mess lol

      res4.ex5

      I would be interested to know if there are any similar indicators, how effective they are...

      f371465a-c4c2-47d6-9a85-795dd8168841-image.png

      posted in General Discussions
      roar
      roar
    • RE: We need to have an in-built News Filter...It is high time we have this MT4 and MT5

      I disagree with myself too, lol

      Yes, news filter does have a benefit, to not open a trade 1 minute before NFP and such... But its not as important as many believe. Its the 99th step of making a good EA. Profitability of an EA will not and should not depend on news filters, unless you are intentionally building a macro data EA.

      I won't go into "prop firms" topic, as in my view those are just clever marketing schemes instead of actual trading institutions.

      posted in General Discussions
      roar
      roar
    • RE: Is FXdreema a SCAM

      Relax, you will get your subscription. I have used this program since 2013 - its not a scam, I can assure you. The admin is a really nice guy and he will surely sort things out. You probably should have contacted him first before posting to a public forum...

      posted in Questions & Answers
      roar
      roar
    • RE: Mouse clicked on object block bug

      @l-andorrà Check your objects list. You create object named "Sells1", but later you check for "Sells" object.

      The "1" is added because you tell the "Draw button" block that there will be many similar objects, so the "Sells" is just a prefix and a number will be added after it.

      To fix, just set setting B = Yes

      18db1448-53cf-431c-a7ee-752c95bbdd62-image.png
      ff41f3af-0852-4072-bc2a-2bcbb8c386d8-image.png

      posted in Bug Reports
      roar
      roar
    • RE: We need to have an in-built News Filter...It is high time we have this MT4 and MT5

      @GeoFX well, there is also many opinions on the prop firm "challenges" - are they legitimate path to career in institutional finance, or are they just get rich quick scams with extra steps.... FTMO's biggest revenue is NOT the trading profit share, its the 155€ fees from the "challenge" itself. That is their business model.

      posted in General Discussions
      roar
      roar
    • RE: Long-term stable profitable EA

      Generally, markets are efficient and there are no obvious methods to make riskless profit. If someone does find an inefficiency and they publish the finding, the market will correct itself and become fully efficient again.

      This is why you will not find a public profitable EA. If you manage to make a truly profitable EA, there is a limited amount of profit you can make with it. It's not very sensible to give this profit away for others, for free.

      posted in Questions & Answers
      roar
      roar
    • RE: Plot MACD swings on chart

      I might as well share more, now that I started.
      https://fxdreema.com/shared/z6zjcToLb

      I used those swings to create statistics for each hour of the day, as we know volatility is different at certain periods of the day. I used some data filters to calculate 3 expected swing sizes for each hour: pessimist case, average case, optimist case.

      Now that the EA knows the expected swings for each hour (analyzed from 10 past days), we can plot the estimate when MACD cross happens:
      0_1614474994844_8714cd42-4550-4986-a93e-51e01b0bff65-image.png

      This EA doesnt have any mechanism to predict the direction, it only shows how big the the swing is most likely to be, if it happens.

      TLDR: This is just an overcomplicated ATR indicator, lol

      posted in Tutorials by Users
      roar
      roar
    • How to detect choppy market

      A challenge for the community: Present the best way to detect a ranging, choppy, non-trending market.

      There are many options to do this, but many indicators seem to either filter too agressively or not at all.

      I will start with something a bit less ordinary, my own indicator that consists of RSI and a soup of moving averages. When white line is between 45-55, market is ranging (counter-trend strategies are safe). I came up with this in the last 10 minutes, so it is probably not quite perfect.
      rsitrend.ex5 rsitrend.mq5
      0a9b97d9-24a6-45c6-846b-a49ff6395344-image.png

      posted in General Discussions
      roar
      roar
    • RE: Bool true or false?

      0_1582291392932_9c90d817-2a2f-4635-bf32-dea3da3aab1a-image.png

      posted in Questions & Answers
      roar
      roar
    • Trading costs tool

      Something to keep in mind while choosing your symbol to trade:
      When you compare the ratio between spread and ATR, you get a number that tells you how costly it is to trade that symbol - how difficult it is to keep trading profitably.

      During the London session, this ratio for EURUSD is around 1-2%.
      At the same time, this ratio for a minor pair such as NZDCHF is 5-8%.
      This essentially means that NZDCHF is about three times more expensive to trade as EURUSD. In other words, finding profits in NZDCHF will be three times harder than in EURUSD.

      https://fxdreema.com/shared/BbQ7b3gvd

      I should also add commissions to the calculation, maybe I (or someone) will in the future.

      0_1615592114527_b5025ebb-69c7-4303-866a-7f241ccb53b4-image.png

      posted in Tutorials by Users
      roar
      roar
    • 1
    • 2
    • 3
    • 4
    • 5
    • 21
    • 22
    • 1 / 22