fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. fxDreema
    3. Posts
    • Profile
    • Following 0
    • Followers 691
    • Topics 32
    • Posts 7485
    • Best 277
    • Controversial 18
    • Groups 1

    Posts made by fxDreema

    • RE: indicator over indicator

      There is no such option, this basically does not fit the Condition block... where can I put this thing. I mean, the structure of the block allows 2 to select 2 operands (left and right) and that's all.
      Initially I was thinking about adding some option to appear for all indicators, where you can select to get it's value or something else from it. From time to time people are asking how to get whatever from an indicator, for example it's last high value. It can be also last low, the time difference between two lows or whatever else based on the data of single or two indicators. There can be many things and each one with it's own parameters, so I don't like the idea to do all this in a single option that can appear for each indicator. It can be in separate blocks, where each block does something with the data and returns the result in dome variable, very similar to the Formula block.
      And if you think even more, all this stuff is actually to be done in a custom indicator 🙂 Indicators are those primarily designed to get arrays of data, calculate something from that data and give you the result of any form 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: HOW WORKS "FORMULA" BLOCK????

      Yes, if a block is not connected, this is the same as it is not there. This rule was from the very start, but sometimes I'm thinking about creating some place to put all those blocks that you don't need right now, but you might need in the near future. And in the same time I think that maybe it's ok to be like it is now 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: help me code strategies only Boilinger band and stochastic

      What means 1/3 of the candle for you? Here are some basic candle parameters that you can get directly: http://docs.mql4.com/constants/indicato ... nts/prices
      If it's something that does not fhese, then I can suggest to use this "Formula" block to calculate this 1/3 point. For this better read it's description to know how to use the Adjuct fields where/if needed. And if you are not sure about the output value you can check it with "Indicator tester" block.
      Then everything else is conditions - use Condition block.

      If "stay within" means something more that 1 candle for you, I can suggest this block "Indicator moves within limits" because it can check if some indicator was in between two values (upper and lower) for few candles in the past. If it's for 1 candle only... maybe this block again or with two Condition blocks.

      To set SL/TP at some custom level, in Buy now/Sell now select this option "Custom (price level)". In other blocks it can be called "Dynamic....". It's the same thing, I just have to rename this everything to "Custom...."

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How do we include custom function using custom block

      This block puts the code that you enter in a function. It's not impossible to close that function at the top and open new one in the code:

      } void MyFunction() {
      

      or even call that function:

      
      MyFunction();} void MyFunction() {
      

      But I will suggest to try https://fxdreema.com/studio/MQL4
      There you can define custom functions that can be called in the project (if something is not wrong, because I didn't tested that soon) in the low right corner where "Custom functions" are.

      I think I can't find that function for CORNER_LEFT_LOWER 😕

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: HOW WORKS "FORMULA" BLOCK????

      I doesn't print nothing, it just creates a global variable, calculates whatever needs to be calculated and stores the result in that global variable (Result). And it has description - right click on the block and hit Information 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How can I add my project to the forum ?

      Of course it's not possible, all the system blocks are what they are - I update them from time to time, they are not meant to be updated by the user.
      Well, here is some old information, now I'm not sure you will understand something, but... at least it's something: https://fxdreema.com/documentation/libr ... y%20studio

      Basically you can open this tool, give a new block name, hit "New", write some code and you will got a new block. All the code is written in a variable, so you should define variables as local or static, global variables also can be used.

      There are few keywords, this is the code for Buy now for example:

      SetSymbol(SYMBOL);
      
      //-- stops ------------------------------------------------------------------
      double sll=0, slp=0, tpl=0, tpp=0;
      
           if (StopLossMode=="fixed")        {slp=StopLossPips;}
      else if (StopLossMode=="dynamicPips")  {slp=~dpStopLoss~;}
      else if (StopLossMode=="dynamicDigits"){slp=toPips(~ddStopLoss~,SYMBOL);}
      else if (StopLossMode=="dynamicLevel") {sll=~dlStopLoss~;}
      
      if (TakeProfitMode=="fixed")              {tpp=TakeProfitPips;}
      else if (TakeProfitMode=="dynamicPips")   {tpp=~dpTakeProfit~;}
      else if (TakeProfitMode=="dynamicDigits") {tpp=toPips(~ddTakeProfit~,SYMBOL);}
      else if (TakeProfitMode=="dynamicLevel")  {tpl=~dlTakeProfit~;}
      
      //-- lots -------------------------------------------------------------------
      double lots=0;
      double pre_sll=sll; if (pre_sll==0) {pre_sll=SymbolAsk(SYMBOL);}
      double pre_sl_pips=toPips(SymbolAsk(SYMBOL)-(pre_sll-toDigits(slp,SYMBOL)));
      
           if (VolumeMode=="fixed")             {lots=DynamicLots(VolumeMode, VolumeSize);}
      else if (VolumeMode=="block-equity")      {lots=DynamicLots(VolumeMode, VolumeBlockPercent);}
      else if (VolumeMode=="block-balance")     {lots=DynamicLots(VolumeMode, VolumeBlockPercent);}
      else if (VolumeMode=="block-freemargin")  {lots=DynamicLots(VolumeMode, VolumeBlockPercent);}
      else if (VolumeMode=="equity")            {lots=DynamicLots(VolumeMode, VolumePercent);}
      else if (VolumeMode=="balance")           {lots=DynamicLots(VolumeMode, VolumePercent);}
      else if (VolumeMode=="freemargin")        {lots=DynamicLots(VolumeMode, VolumePercent);}
      else if (VolumeMode=="equityRisk")        {lots=DynamicLots(VolumeMode, VolumeRisk, pre_sl_pips);}
      else if (VolumeMode=="balanceRisk")       {lots=DynamicLots(VolumeMode, VolumeRisk, pre_sl_pips);}
      else if (VolumeMode=="freemarginRisk")    {lots=DynamicLots(VolumeMode, VolumeRisk, pre_sl_pips);}
      else if (VolumeMode=="fixedRisk")         {lots=DynamicLots(VolumeMode, VolumeSizeRisk, pre_sl_pips);}
      else if (VolumeMode=="fixedRatio")        {lots=DynamicLots(VolumeMode, FixedRatioUnitSize, FixedRatioDelta);}
      else if (VolumeMode=="dynamic")           {lots=AlignLots(~dVolumeSize~);}
      
      //-- send -------------------------------------------------------------------
      int ticket=BuyNow(SYMBOL, lots, sll, tpl, slp, tpp, Slippage, (MagicStart+OrdersGroup), MyComment, ArrowColorBuy);
      
      if (ticket>0) {~next~} else {~error~}
      

      Use ~next~ where next blocks should be executed
      Use ~inext~ for yellow output
      Use ~error~ for gray output
      Use ~MyParameterName~ to get the value of any parameter. In the help you will see ~f:Parameter~ - this does not work anymore.
      Use ~X~ to get the ID of this block

      I think those are the general ones. All these are replaced with something else while building the EA.

      You can create custom functions, even with the same name as those I have created. In this case mine will be automatically renamed in system blocks, but still used.
      I will not recommend to use Predefined parameters.
      In this field below the code you can define global variables for this block. better define them one in a row... or better use static variables.

      I can recommend to use integer values for select (options) type of parameters. Here I used string values fot this VolumeMode, which looks fine, but it slows down the EA. Especially when used in blocks that are executed on every tick. At least Buy now is not one of these 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Broker execution model

      From some months the native MQL4 function OrderSend() handles instant and market executions by itself. I don't expect problems, or at least not after all the work is done on their side 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How can I add my project to the forum ?

      I tried it now and it seems to be working, so I don't know. But nevermind, as i really can see all your projects (on the web version only), just ask me? 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How can I add my project to the forum ?

      From the web version, go to Projects - Create a shared copy, which is the last option there. But I can also see your projects there without this 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Помощ за МА пресичане

      Пробвай с един "Once a day" най-отгоре. Както казва името на тоя блок, той върши работа 1 път на ден, а този "Set...." сам себе си повтаря няколко пъти, тъй че "Once a day" действа само за първия маркет.

      Хванах и един потенциален проблем обаче. Когато се използва тоя блок "Set..." за маркетите, то тези блокове от типа Once per bar може да не работят коректно, щото вътре в себе си пазят информация за последното познато време на текущия бар (time0). И когато смениш маркета, неговото време (time) се сравнява с времето на предишния маркет (time0) и става един вид интерференция 🙂
      Трябва да го преобразя така че да помни едновременно и независимо няколко маркета (масив), ама не знам дали да го правя щото това ще забави един от най-често ползваните блокове. И не е само тоя блок от този род, което е по-лошото. Най-лесно ще ми е да махна "Set..." и да кажа - пускайте си експерта на 100 графики отделно 🙂

      
          //////////////////////
          // Input parameters //
          //////////////////////
           
          string SYMBOL=CurrentSymbol(); // Market (empty=Current)
          int TIMEFRAME=CurrentTimeframe(); // Timeframe
           
          ///////////////
          // Main code //
          ///////////////
           
          static int time0;
          int time=iTime(SYMBOL,TIMEFRAME,0);
          if (time0<time) {time0=time; /* Orange output */} else {/* Yellow output */}
      
      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Помощ за МА пресичане

      Леле мале, понякога се чудя тая програма дето съм направил дали помага наистина или още повече забатачва работите 😆 Уж трябва да прави нещата лесни, а често се плаша като видя някой проект.

      Първо бих ти препоръчал Set "Current Market" for next blocks. Оставяш една група и пишеш всички маркети дето ще се ползват. Този блок на всеки тик ще повтори групата след него толкова пъти колкото маркети си въвел, за всеки маркет по веднъж. И тук трябва да се отбележи, че зависиш от тиковете на тоя чарт дето си вкарал експерта в него. Независимо какво се случва в останалите - дали има тикове или няма - чак когато на текущия се появи тик, чак тогава се изпълняват блоковете, каквито и там да са.

      Другия вариант е по-препоръчителен, ама по-разтеглен - да вкараш един и същи експерт на всеки маркет поотделно. Така всеки си работи сам за себе си, разчита на собствените тикове и не се пречка на останалите.
      Понякога си мисля да направя система дето да разчита тиковете на няколко маркета в дадения експерт. Т.е. "on Tick" да е съчетание от няколко различни. Обаче ефективността на такова нещо предполагам би била ниска, защото един експерт когато започне да прави нещо, не може да прави друго нещо в същото време, тъй че ще има изчакване и ще е доста грубо. Така да се каже, един експерт е един процес (прозорец), и не съм сигурен дали могат да се стартират няколко независими които да останат контролирани от него 🙂

      Иначе ако бектестваш, то там нали знаеш че може да се работи само с един маркет, та най-вероятно имаш грешка. Ако не си на бектест обаче, дали имаш грешка?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Script gets mashed in Custom MQL4 code block - local v079

      Try 080, it's up now 🙂

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Cross Width Doesnt Save

      Only 1 value can be used for Candle ID, and I don't think I will do something about it, at least not in Condition 🙂
      Maybe "Indicator moves within limits" can be used for this, because it checks each candle. Normally it checks some indicator for each candle, but candle parameters can be considered as indicators, so... not impossible.

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Cross Width Doesnt Save

      When you view code from fxDreema it's always /* Orange output / and / Yellow output */, but in the output file it's not. If this is in the code, then this means that nothing is connected to the output.

      Not possible 🙂

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Can I Pay You To Make My Robot For Me?

      I think you asked me about this Seek project and there are at least 5 problems with it. Actually I started to answer to this topic looking at this exact project and then I realized that it is old one. But I keep my answer, so here it is...


      Because I can see your project, I can tell you what's wrong with it, it's something general, many people are failing with it. Open http://fxdreema.com/examples and find the example named "Wring: Closing rule". There you will find explanation about the problem.
      In short, the problem is that after "Buy now" and "Sell now" you can't expect to catch ticks. Just break some connections, make sure that nothing is connected to blocks 9 and 14.

      Another problem that you have - only block 1 is where it should be, all the others needs to be under "on Tick" event.

      What you don't understand is the main events, obviously. The most important one is the tick event "on Tick" that happens when a new tick comes. MetaTrader have this special function that runs on every tick. It has another one that runs once when the EA is added to the chart (on Init), another one that runs once when the EA is removed (on Deinit) and another one that runs every time when some chart event happens (on Chart). The other two are created by me, but anyway.

      Just make sure that you understand all those events and why they are there. You can find some other examples about this in the link above. Then you will know where to place blocks!

      Another problem - block 14 - I think it's the wrong one, choose the other one that has name starting with "No...". Otherwise you will end up with endless orders.

      Another problem, I'm not sure that you understand the trailing stop. It works only for trades (those orders that are currently running and have profit/loss, not pending orders). I don't know why block 16 is there.

      Another problem, block 15 is there for nothing.

      Another problem - I believe you don't need block 2.


      Well, I'm not sure that Seek and the strategy of this topic are the same thing, but anyway, the problem seems to be that you just don't know some basics about EAs and this is something in general.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Can I Pay You To Make My Robot For Me?

      I personally don't wish to do that to anyone, I just don't feel it. Let's say I have some issues when communicating with people 🙂 So I'm here to help people to work and understand fxDreema.

      You can show me what you have tried so far if you want, and I can tell you what's wrong with it. I guess you are using the local version now because I can't see something new in your projects in the web version.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Custom indicators

      It's candles time = server time.
      I don't remember how I've made it, but if it calculates values inside the period, then I can suggest to put some time filter above (maybe Hours Filter). And I also think this will also speed up the backtest.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: sell limit pending order

      Use negative value for Price offset. It depends where is the open price - above or below the current price.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Loss question

      Use string. This char is new for MT4 now, but it's one of these various numeric formats. I don't know what they are thinking, there are more than 10 numeric data types in this "programming language". I never experienced too much of RAM usage with any EA, as a thing those EAs are really small and lightweight, so what's the point... I don't know.

      But anyway, in fxDreema there are some input options, what I can suggest is to define this as a Constant, look on the right side Constants (Inputs). Select "text" there.
      But why you will want to define currency? If it is multicurrency strategy I understand, but if it uses only 1, then it is already defined - the default currency is that on the chart. In other words, when you add EA to EURJPY chart, that EA knows that currency and it will use it as a default.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Check Loss question

      This block "check loss" is not to be used like this. But I just answered the same question here: topic/2426

      posted in Questions & Answers
      fxDreema
      fxDreema
    • 1
    • 2
    • 292
    • 293
    • 294
    • 295
    • 296
    • 374
    • 375
    • 294 / 375