fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. trader.philipps
    T
    • Profile
    • Following 3
    • Followers 38
    • Topics 20
    • Posts 1001
    • Best 91
    • Controversial 2
    • Groups 0

    trader.philipps

    @trader.philipps

    108
    Reputation
    3531
    Profile views
    1001
    Posts
    38
    Followers
    3
    Following
    Joined Last Online

    trader.philipps Unfollow Follow

    Best posts made by trader.philipps

    • Tutorial Expert Advisor with some recent issues solved

      Here is the Tutorial EA that I recently created and which covers some of the issues that were asked for in the forum. I tried to keep it as simple and structured as possible.

      Disclaimer: This EA is created only for eductaional purposes. It's functions are rarely tested and may contain errors. Using this EA on a real account is strongly not recommanded as the strategy settings are not optimized at all!

      Key Features:

      • Risk Control based on Balance (SL)
      • SL ATR multiplied based
      • ATR based trailing
      • TPs ATR multiplied based (TP1 / TP2)
      • TP1/TP2 visualized by horizontal lines - values will be picked up on terminal restart
      • Close on Opposite signal
      • Close on max. age
      • Limiting trading time
      • Protect from tripple swap

      ToDos:

      • News filter

      Custom Indicators used:

      1. tma-line-extreme-indicator
      2. vq-stridsman_on_jurik2_mtfalerts_nmc
      3. waddahattarexplosion_averages_nmc_alerts_2_1
        Any Credits go to the authors!

      Installation: Unfortunately I cannot upload a zip file, so you must do a little work manually.

      Create a Folder "TMA-EA" in your indicators folder (IMPORTANT!!!) and copy the following indicators into it.

      5_1580504153979_waddahattarexplosion_averages_nmc_alerts_2_1.mq4
      4_1580504153978_waddahattarexplosion_averages_nmc_alerts_2_1.ex4
      3_1580504153978_vq-stridsman_on_jurik2_mtfalerts_nmc.mq4
      2_1580504153977_vq-stridsman_on_jurik2_mtfalerts_nmc.ex4
      1_1580504153975_tma-line-extreme-indicator.mq4
      0_1580504153969_tma-line-extreme-indicator.ex4

      Please rename the files according to the names mentioned above as the forum adds strings as prefix to the uploads. But do not remove the file extensions!
      It should look like this

      0_1580504658092_a8b058c2-9249-4c75-9947-b220b2c0bffc-image.png

      Copy (and rename) the files in the expert folder to the experts folder of your MT4 terminal.
      1_1580504633596_Tutorial-EA_V1.0.mq4
      0_1580504633595_Tutorial-EA_V1.0.ex4

      Currently I do forward tests on M30 timeframe in order to things happen more often. The screen when EA is attached to the chart should looklike this:

      0_1580503834688_aa02ac68-5a26-4eba-a233-50bc47360918-image.png

      You can import the file Tutorial-EA_V1.0.mq4 into a fxdreema project, The result would look like this.

      0_1580505020013_c6866698-f30a-4fb9-bcef-b9d8dfc030db-image.png

      posted in Tutorials by Users
      T
      trader.philipps
    • RE: Stop "Trailing Stop"

      @indaplace2be Try this in a loop "for each trade" filtered for buy trades.

      0_1574529413592_0f35ea85-4028-4c4c-9b92-bc3624512e76-image.png

      If condition is true (orange dot) you'd run the trailing block.

      For sell trades you check if SL is greater than open price.

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Call a function for calculating next higher timeframe ** SOLVED **

      I found the solution. I do the following in the on Init tab:
      0_1567721558667_Auswahl_514.png

      The in variables vi_current_timeframe and vi_next_timeframe I defined in variables as integer.

      Here the code if someone wants to do the same:

      //
      int TimeFrames_cust[9] = { 1,5,15,30,60,240,1440,10080,43200 };
      int CurrentTimeIndex = ArrayBsearch(TimeFrames_cust,_Period,8,0,MODE_ASCEND);

      vi_current_timeframe= (ENUM_TIMEFRAMES) TimeFrames_cust[CurrentTimeIndex];
      vi_next_timeframe= (ENUM_TIMEFRAMES) TimeFrames_cust[CurrentTimeIndex+1];
      //

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Read file data

      @ekifox Finally by try and error :))

      Use this for handle:

      //
      int handle = FileOpen(tempFileName,FILE_READ|FILE_CSV|FILE_ANSI);
      //

      Don't ask me why it has to be FILE_ANSI as I saved my file with UTF-8 encoding explicitly.
      However, the result looks like this..

      0_1569458105983_7d7dc2bf-ee91-45bf-8fff-7ec6f78b45ef-image.png

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Store Trade Targets such as TP1, TP2, etc. *** SOLVED ***

      @roar Used the horizontal line approach for now. I will post my work in the tutorial section after some testing (including forward on demo).

      Here are the main features ..

      This project demonstrates how to solve several issues that may occur during building an Expert Advisor. Here are the Key Features:

      • Risk Control based on Balance (SL)
      • SL ATR multiplied based
      • ATR based trailing
      • TPs ATR multiplied based (TP1 / TP2)
      • TP1/TP2 visualized by horizontal lines - values will be picked up on terminal restart
      • Close on Opposite signal
      • Close on max. age
      • Limiting trading time
      • Protect from tripple swap

      ToDos:

      • Volume filter
      • News filter

      That's how it looks like right now.

      0_1580448822418_28561413-6b6e-4cdf-b07e-58c8e69a3b20-image.png

      posted in Questions & Answers
      T
      trader.philipps
    • RE: ENUM in constant declaration ** Solved **

      Try and error. I took a look how the indicator is embedded in fxdreema. Here is an example.

      0_1567876273288_Auswahl_522.png

      It seems like all you need to do is to use the indicator somewhere and than in the constants declaration you use the same syntax.

      0_1567876389212_Auswahl_523.png

      That's it!

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Help needed in modifying values in a sequence

      @rafaels919 Sorry, I mixed up the projects. I meant @roar 's approach.

      I pimped the code a bit to make it more obvious what @roar or I with my answer meant.

      In roar's project he sets the constants like that

      0_1579244004087_fc9f20b3-b6eb-452d-ae0e-4e509eb51f0f-image.png

      Those are 6 values. Roar splits that sequence string into 6 parts (seperator is the comma) and creates an array seq[i]. In the given case the array index has a size of 6. As arrays are 0 based, this means it starts counting by 0 (not by 1). You can read the integer value of each array position in the index like
      seq[0], seq[1], ...,seq[5]

      I print this out in the log and here is the result ..

      0_1579243945176_57e9d83d-976c-46c3-bd7c-afeec8f49654-image.png

      Knowing this, you can at each time go wherever you want in the index of the array by selecting the right index value.
      So if you count your losses by a variable, you can use the array like roar did in the BUY block.

      baseLot * seq[loses]

      0_1579244484479_Auswahl_843.png

      loses is the integer of your losses counter. So if you are at losses 3, it will do like baselot * seq[2]
      Unfortunately there is a glitch in roar's code as the array is 0 based. So if the first value is not 1, it will not match corectly (or in other word works different to fxdreema). But that's not that important.

      Did you get what I mean?

      Again in short refering to roar's version.

      Sequence is: 1, 3, 5, 7
      Startlot is 0.01

      Will result in ..

      seq[0]: 1
      seq[1]: 3
      seq[2]: 5
      seq[3]: 7

      Where the numbers in brackets represent the value of you losses counter.

      Is that clear?

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Help needed in modifying values in a sequence

      @rafaels919 With @roar 's solution you can step back and forth to any position. You may also consider another variable for the sequence position and modify this only and keep the losses variable as is if that makes sense.

      In the concrete case if you want to step back 2 sequence steps, you would
      a) check if losses >2
      b) count losses-2

      In the case you want to step forward you need to ensure that the result is not bigger than the sequence index (roar uses the variable seqLen). And of course always keep in mind that the array is 0 based.

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Candle ID for ATR indicator

      @tanjiayi1 Here in short ...

      1. right
      2. also right, but as you are at the very begining of the candle, the result is wrong. If you have a period of let's say 14 it can make a slight difference especially on a daily chart. If you use period 200 or something like that, it won't matter that much. But by principle you should work with closed candles - meaning candle ID1.
      3. Well, I think I answered that in 2 already, but from calculation perspective assuming your ATR period is 14, using candle ID0 means calculation of 13 full candles and 1 with almost no move when you EA opens the trade or checks the condition.
      posted in Questions & Answers
      T
      trader.philipps
    • RE: Symbol from market info without any pre- or suffix

      @roar Okay, will dig deeper into it once news filter is working. Right now I just do this

      0_1580652143435_68cd63df-aff8-4c57-a9bc-182dff9b4d38-image.png

      Thanks a lot!

      posted in Questions & Answers
      T
      trader.philipps

    Latest posts made by trader.philipps

    • RE: arrow EA

      @regalo are you sure that the buffer has a price value?

      0_1590072736958_63f36a23-05c9-4917-bd15-c11bd4a065eb-image.png

      and as @ambrogio said .. better use ID1

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Closing Trades

      @johnny_prd Create a loop for orders and use this block

      0_1587424526916_cc1c42a5-7515-4a19-b131-3d101824c833-image.png

      if you want to set it by time.

      Another way may be using expiration but maybe that works only for pending orders. Haven't tried yet.

      posted in Questions & Answers
      T
      trader.philipps
    • RE: compiling issue

      @zackry Are you getting any warnings when compiling in Metaeditor?

      posted in Questions & Answers
      T
      trader.philipps
    • RE: compiling issue

      @zackry Are you sure ex5 is compiled by fxdreema without any issues? I remember I once had an issue with a block where I changed some setting, but the one configured before was still also compiled. For instance if you choose a Buy block with fixed SL / TP and put a variable in there and save it. After that I changed the MM to risk percent based on SL but didn't clear the variables used before in static SL / TP. If I remeber it right, fxdreema compiled well or at least didn't show any issue, but compileing the sources in Metaeditor caused errors.

      posted in Questions & Answers
      T
      trader.philipps
    • RE: check profit question

      @norbii012 said in check profit question:

      i want make this somebody can help me pls ?
      check running trade , and if it is not profitable, do not open another trade, if it is on profit, make trade

      Try this block as a condition to check.
      0_1586492261853_6b5fc45d-99dc-493f-a785-c5730cb1a055-image.png

      posted in Questions & Answers
      T
      trader.philipps
    • RE: Partial closure on MT5 doesn't round lot size to a valid value

      @xfire said in Partial closure on MT5 doesn't round lot size to a valid value:

      @trader-philipps Hi. can you share your project?
      i see you have a message for retrying in 5 s maybe your broker have problem with your EA

      Sorry, can't share it here. But it is easy to reproduce. Choose an uneven lot size and partly close 50%.

      posted in Bug Reports
      T
      trader.philipps
    • RE: Partial closure on MT5 doesn't round lot size to a valid value

      @l-andorrĂ  Yeah, looks like. Thought it was so easy to just use that block. I think in MT4 it works fine.

      posted in Bug Reports
      T
      trader.philipps
    • RE: "object on chart" on previous candle ?

      @zackry If you know the name, can't you choose the Candle ID 1? Haven't used it ever, but maybe it gives you the candle ID and you might compare it if it equals 1.

      0_1586489675775_4d6fb7b0-a4fe-48fd-8b15-81d1e85daad1-image.png

      posted in Questions & Answers
      T
      trader.philipps
    • Partial closure on MT5 doesn't round lot size to a valid value

      I was just adding the scale out to my project which is done by partial closure. However, fxdreema doesn't round to a valid lot size and I see the following error in the log

      0_1586391230594_e6fc00fa-2e61-4525-9347-a8fdd223cc7b-image.png

      Here is the corresponding block.

      0_1586391297211_0cc8b0b2-f466-4a10-9747-e083b92ec106-image.png

      posted in Bug Reports
      T
      trader.philipps
    • RE: Chart Indicator EA

      @l-andorrĂ  I think in this case it's nit so hard - the indicator has just 1 parameter đŸ˜‰

      posted in Questions & Answers
      T
      trader.philipps