fxDreema

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

    roar

    @roar

    Need small help? Tag me in your post
    Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

    580
    Reputation
    18535
    Profile views
    2406
    Posts
    184
    Followers
    0
    Following
    Joined Last Online

    roar Unfollow Follow

    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

    Latest posts made by roar

    • RE: custom function

      @alexitoeve50 you need to define your function in https://fxdreema.com/studio. No need to make any custom block in the studio, just add the function to the list here.

      6536d089-9b88-4e6d-9623-f36d4df4ed3f-image.png

      posted in Questions & Answers
      roar
      roar
    • RE: All Comment add on the chart ?

      @ItzShahzad-X look at your Objects list in MT4 - you will see that technically its just a bunch of label objects with a background rectangle label.

      You could do the same with fxdreema block draw text by x and y coordinates, but it takes a lot of time. Faster method is building the graphical panel using custom mql4 code in Metaeditor, and then copy-paste that code into fxdreema custom code block.

      9d0a24a1-0e56-4df7-ab2d-79ee33ac78d6-image.png

      posted in Questions & Answers
      roar
      roar
    • RE: Change a Timeframe Variable Using Modify Variables

      @jed711 think of enumerations like integers with some text label on top of it. In fxdreema the dropdown selection should be numeric or code input.

      posted in Questions & Answers
      roar
      roar
    • RE: I'm getting frustrated, I need to draw the bos and choch in my graph, does anyone have that code and can you share it please?

      @DragonZueloTrends what are "correct" bos and choch? You ask that question from a million traders, you get a million different answers.

      Its totally subjective, and thus not a good basis for trading strategy imo.

      posted in Questions & Answers
      roar
      roar
    • RE: MT5 Optimizer not working with many FX Dreema EA - RESOLVED

      @BBMess I guess DayOfWeek() doesnt accept any parameters, it always uses current time

      posted in Bug Reports
      roar
      roar
    • RE: Longterm Scalping EA

      @StefanMichelle This EA will add trades to losing position, again and again until either profit is reached or account is blown. You can run a 10 year test to get the latter outcome.

      All EAs should have some mechanism to unwind losing positions safely, blindly adding more lots is not enough long term.

      posted in Questions & Answers
      roar
      roar
    • RE: please help custom indicator

      @StefanMichelle the link you posted compiles without any errors
      https://fxdreema.com/builder/shared/NAIY2Lv2c

      posted in Questions & Answers
      roar
      roar
    • RE: ClosedProfit() function

      @RajVoCash you have a block "For each closed position", very simple to get the closed profit using that block and "modify variables". No need to use custom code.

      Technically its possible to use custom functions by either

      • Making a custom block in the studio
      • Taking the inside part of the function (the stuff within {}) and putting that to custom mql block, and finally putting the result (that would normally be the "return" statement) into a standard fxdreema variable.

      These 2 methods will be 50x more difficult than using the standard blocks, but youre welcome to try if you like making things difficult lol

      posted in Questions & Answers
      roar
      roar
    • RE: How fast is "OnTick" Event ?.

      @tharindu999 its #2
      ca7e6630-4207-4b6f-8f74-090202329bae-image.png

      posted in Questions & Answers
      roar
      roar
    • RE: please help custom indicator

      @StefanMichelle picture looks ok, need to see the full project to find out

      posted in Questions & Answers
      roar
      roar