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: Closing All Position when x% of Balance

      Well, they are always closed one by one by EAs, or at least I don't know any way to tell the server to close multiple at once.

      But you probably mean something different, as you are using a block that serves 1 trade at a time, because all blocks with pink color are just like this.
      If you want to compare the general Balance with Equity or Profit, use Condition block. You will also need to use the "Adjust" field to transform one of the operands to % value. Look in the description of Condition for more info.

      Or if you want to use the profit only from certain group of trades (or those that you have from this exact EA), then use "Check current unrealized profit" block. Well, the little problem here is that you have very simple input field for "Profit amount", but this can be better. Inside this field you can write not only numeric value, but also a whole MQL4 formula, so you can calculate the % value directly. To get the current balance use AccountBalance(). For example, 5% of the balance will be value like *-AccountBalance()5/100 (with minus sign).
      Ah.... and to close all trades use "Close trades" block with the same filter settings as those used in "Check current unrealized profit". Of course, this will close them one after another as I mentioned above, but it will close them all 🙂
      Try this with some 1000 initial balance: http://fxdreema.com/shared/oRW5zQPke
      I have this result (with some weird visual bug that I see for the first time, but anyway): http://prntscr.com/360ryr

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

      It's not custom indicator, but try with block Condition, go to Market properties and there you will find Lowest and Highest options.

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

      Празното поле е 0 ако е числово. Оставил съм го празно вместо 0 да не бие много на очи и да не си играят много с него 🙂

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

      Ами няма как, не съм го мислил това когато съм го правил 🙂

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

      http://prntscr.com/35bv1r
      Това зарежда въпросната поръчка. После може да се ползва "check type" или там каквото трябва. И разбира се става въпрос за текуща работеща поръчка, не затворена, и ако няма такава блока няма да премине.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Cross Width Doesnt Save

      It is, at least on the web version and on the latest local versions. But if you find that it's not working, let me know.

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Trailing stop

      01 - First SL move will happen when profit is 10 pips, and SL will be placed 30 pips below the current price then, or at -20 pips relative to the open price. Second SL move will happen when profit is 20 pips, and SL will be placed at -10 relative to the open price. And so on...

      02 - Trailing stop is relative, as it says it is in the middle between the current price and the open price. But in this case you should have some Trailing Start, because you need some room for this. In the beginning CP-OP is zero or too small, so before doing trailing stop it needs to build some profit, and then it will keep SL in the middle between the current price and the open price. The more profit you have, the further the SL is (if you measure it in pips or points).
      If Trailing stop is 100 pips, 10% of Trailing stop is 10 pips.

      03 - Only if you have TP, if TP - 100 pips, then TS will be 100 pips (when 100%)... obviously. And Trailing step is relative to Trailing stop, will be 10 pips.
      If TP is 200 pips, TStop will be 200 pips, TStep will be 20 pips. All relative to TP.

      04 - The same as 02, but TStep is fixed. Again, use this TStop method with some Trailing Start, you need to gain profit before start trailing, and how much profit is needed... depends on the trailing stop you want.

      05 - Will modify TP to 50 pips when it's not 50 pips. 50 pips relative to Open price and it will stay there... If I remember correctly.

      06 - Will clear TP.
      Start when profit is Nevermind... it will modify SL in the beginning, no matter if yo have some different SL for the trade.

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

      качих ти го тоя блок. Би трябвало да работи коректно, ако намерих бъгове пиши. Правилата са:

      • Ако има губеща поръчка и печеливши, тъй че сбора от печалбите на тази поръчка и печелившите да е толкова колкото желаем (10 долара) - да ги затвори.
      • Коя е Buy и коя е Sell не се отчита.
      • Затваря първо губещата, после най-печелившата от печелившите, после по-малко печелившата и т.н.
      • Ако има поръчка с печалба 0 не се отчита въобще.
      • Ако има само печеливши поръчки също ще ги затвори когато общата им печалба е достатъчна.
      • Ако има само една печеливша - също.
      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Помощ за МА пресичане

      Пробвах да пускам поръчки от срещуположния тип на най-губещата, примерно ако имам някой Buy дето е най-губещ добавям само Sell. Кофти момента тука е че в даден момент можеш да увиснеш с много Sell които също трябва да се избиват, особено ако са се отворили на почти една и съща цена. Ако пускам така всеки ден по една и ако дните са слаби те се получават на почти една и съща цена 🙂 Така че пробвах с условие да пуска на разстояние от предишната, също пробвах и с грид от чакащи поръчки, ама все си има някой подводен камък 🙂
      Ами аз като имам минимум от 0.1 лота и ако ги отварям по-често се получава тоя момент с натрупването на много поръчки на близка цена, резултата става плачевен бързо.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Timeframe Setting In EA Blocks

      I don't know for sure because I can't see what is actually in the data files. In MT4 in the History Center we can see what we have in M1, M5 and so on. If M1 data is missing before let's say 2013, then we know it, but in MT5... I'm sceptic 🙂 And you can't import your own data 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Timeframe Setting In EA Blocks

      At least give block 1 id number that is greather than 6. Otherwise I don't know about Tickstory, I don't use it. I tried it, but... It's too much for me - MetaTrader, then fxDreema, then Tickstory... only because MetaTrader itself is not enough. I prefer to keep it simple, if possible 🙂

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

      Снощи си направих един по-елементарен блок без много екстри, ползва само MinProfit параметъра, ей му кода:
      [code=mql4:321epydh]// Create arrays for temporary local database
      double list_profits[]; ArrayResize(list_profits,0);
      int list_tickets[]; ArrayResize(list_tickets,0);
      int list_types[]; ArrayResize(list_types,0);
      int list_tickets_to_close[]; ArrayResize(list_tickets_to_close,0);

      // local parameters
      int total=OrdersTotal();
      int pos=0, i=0, j=0;
      bool next=false;

      //-- collect data - array sorted by profit (losable fist, profitable last)
      for (pos=0; pos<total; pos++) {
      if (OrderSelect(pos,SELECT_BY_POS,MODE_TRADES)) {
      if (FilterOrderBy(GroupMode,Group, MarketMode,Market, "both")) {

           int ticket=attrTicket();
           double profit=attrProfit()+attrSwap()+attrCommission();
           
           int size=ArraySize(list_tickets);
           ArrayResize(list_tickets,size+1);
           ArrayResize(list_profits,size+1);
           ArrayResize(list_types,size+1);
           list_tickets**
      

      и си играх цяла нощ да тествам, и макар че понякога дава добри резултати, то винаги е на косъм нещо да се провали, малко като при мартингейла. То това не е далече от мартингейла на практика, целта е същата - да си върнем загубите с печалби.

      Пробвах всеки ден да пуска поръчка на случаен принцип - или купуване или продаване, как му дойде. Ако имаш 10 хилки, то може за година да докара 2-3 отгоре и май няма супер голям drawdown. Но като пробвах с 3000 то се случва да върви перфектно и от един момент нататък да пропадне колосално. Само че ако не пропада печалбите ми изглеждат доста големи, явно риска е голям за тази сума, защото минимума ми е 0.1 лота. Ама като знам форекса каква измама е, не бих вкарал 10 хилки за да чакам 12-13 до другата година, макар и нещата да изглеждат сигурни на пръв поглед 🙂 То и без това нямам толкова, не ми достигат има няма 10 хилки 😆

      Иначе тоя код е подготвен и за режим когато се опитва да избие от по-дребните загуби, но установих че това не води до добри резултати. Така големите загуби остават да тежат, а те са големи. Най е добре когато целим да избиваме най-голямата губеща поръчка в момента.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Code Performance / Backtesting

      I can suggest something fancy, and limited, at least to speed up the initial ticks creation process 🙂 If you have enough RAM, create a RAM disk and put MetaTrader there. RAM disk is like you have HDD, but it's from the RAM and it's super fast, and it does not wear like SSD's, and it's easy to create/delete one. I personally use SoftPerfect RAM Disk, but there are other options.
      I don't know if this speeds up the backtest itself, but if it reads from the disk while backtesting, then most probably it will be faster.
      I tried this yesterday with 1GB fom the RAM, I was able to backtest 1 year. But if you have some more RAM it will be really nice 🙂

      There is even a way to redirect some local folder to another folder - to trick Windows to think that it uses one folder, but to use another. Well, I've tried this once without success 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: questions

      If I'm not wrong it's something like this: http://fxdreema.com/shared/Ndul9RiGb
      but it's not really profitable 🙂

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

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

      Сега се замислих дали съществуващите опции имат смисъл, дали не трябва да има още. Как би трябвало да се затварят поръчките - дали да взима предвид вида им и теглото им (колко лота са и каква печалба са натрупали) и кой знае какво още. И май отивам още по-далече.

      Та... каква беше основната идея за въпросния блок? 😆

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

      Вероятно първото изключва второто. Но гледах в кода, не съм сигурен дали не съм допуснал някаква грешка, трябва да си го припомня.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Code Performance / Backtesting

      No, I don't think so, it depends on the blocks before the one that is disabled - if they are some conditions that check something only to reach one disabled block below, then they are parasite.
      Well, it's true that EAs made with fxDreema are not so fast, this is because of the universal nature of fxDreema - most of the blocks has different input parameters/options that are included in the end product, and these are also parasite.
      Maybe there are things I can do to make it faster, but I've tried it before and the result was that I need to sacrifice something else 🙂
      Otherwise I can suggest when you have multiple conditions to put those that are easy and simple to check at the top. Basically indicators, especially custom indicators are better to be below. Filters like "Time filter", "Once per bar", "No trade..." - on top. Also, connect blocks one after another instead of using "AND" block.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Feature Request:

      I don't know, I also feel all the good and bad things, for example I love to add new blocks, but I hate to connect blocks. This one - to export files... yes, it's some action, but one of these that I actually like 😮

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

      Някакви упътвания съм писал за тия параметри:

      __This is the maximum number of losable trades to try to eliminate, starting from the one with the biggest loss.

      For each of these losable trades it will try to find profitable trades with enough total profit and it will close them all.[/quote:7vr3pqwy]

      __This is the maximum number of losable trades that can be eliminated in one turn (in a single execution of the block).

      [/quote:7vr3pqwy]

      ама не си спомням много целия принцип на блока 🙂

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

      Леле, аз даже не знам къде ми е този блок сега 🙂

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