fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. samdeka
    3. Posts
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 40
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by samdeka

    • RE: How to avoid losses at each tick?

      __1) This depends on the current conditions, the EA is not doing tricks for fun 🙂 I tested it, it was ok for me.
      2) Mmmm check again
      3) MetaTrader 4 is known for it's bad history data. Sometimes there are months and even years of missing data. You can go to delete some files (in "history" and "history/downloads") and download data again. It's not that this will fix all the problems, you will get holes of data in other places 🙂 This is well known problem for MetaTrader 4.
      Or try Ticks Data Suite or Tickstory (use Google here).
      4) You can't. These are trades that are closed when the finish date is reached. These are currently running trades at that time, they hold their profits and losses.[/quote:3e4417gr]

      Thanx you.
      I will try my best again 😏 to improve the EA, and make it as closer as possible like my will.
      Many thanx for your help. 😉

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      Thanks everyone for your previous help.
      I tested your advices, and I think that I have still the same problems.
      So I made a new disposition of the EA blocks. Please find attached: https://fxdreema.com/shared/02cs2xu1d
      Strategy test made on eurusd for the month of june 2014.
      The problems that I want to solve is that:

      1.Normally according to the graphic we should have successive buy and sell trades but not
      in the range that show the strategy tester. It seems that, the test takes in account, first the buy
      trades, and secondly the sell trades.
      Whereas it should take them in the mix range, according to the occuring of each trade whaterver the type.

      1. I noticed that a lot of trades are missing in the test, whereas they appear on the graphic.
        So maybe its about "close profitable trades" block which has not appropriate parameters (I will check).

      2. Why, the strategy tester makes the test only for one month (it does not take in account more than one month),
        and at the end of the test, it jump to the last day of the strategy test,
        and make a big loss displaying "CLOSE AT STOP"?

      3. How can I avoid this "CLOSE AT STOP" loss, at the end of the test?

      Thank you again.

      ......
      buy trades follewed by sell trades not accordingly to the graphic.jpg
      how to avoid close at stop loss.jpg
      close at stop in graphic.jpg

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I think it works for me. I disabled block 2 to check sells and this is the result: http://prntscr.com/40d3cx[/quote:5qfhcrvq]
      Thanx. I will check and reply.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __Your chart history data is probably bad.. You can re-download them this way (in mt5 at least):

      • close metatrader
      • locate the metatrader history folder, here's an example path: C:\Users\ExampleUser\AppData\Roaming\MetaQuotes\Terminal\D0E09F77C8C37AD8BF0E51FF834584\bases\Alpari-MT5\history
      • delete everything inside the "history" folder
      • start strategy tester, it should download new data automatically[/quote:3n6jnga8]
        Thanx. I will check and reply.
      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      Hello everyone and thanks for your programming help.
      My problem compilation has been fixed and now I can test easily my strategy.
      Now, the small losses has disappeared. I think it was the "Close trades" which was wrong.
      So this time, Id like to check if my CCI strategy can work bothly with "buy" and "sell" blocks.
      When I test it, I see differents problems:
      1- it is only the sell trades which are took in account, and the buy ones are not considered
      2- all the sell trades are not took in account, some are missed up
      3- I tested from January to june, but the test runs only for the month of january
      4- at the end of the test, the tester jumps from the end of january to the end of june
      (february,march, april, and may are missed up), and we have the type "close at stop" and a big
      loss of pips. How can this happen and how can I avoid it?

      This is the link https://fxdreema.com/shared/bUnpDjCQc

      Tell me all the critcis and advises. Thanx

      ......
      close at stop loss and sell trades only.jpg
      losses due to close at stop.jpg

      posted in Questions & Answers
      S
      samdeka
    • RE: MT4 compilation problem "array passes by reference only"

      ____I was reported about the "New order error" and I fixed it. It has nothing to do with the other warnings, but I will check those warnings anyway, I don't like warnings about arrays :)[/quote:26wq2en0]
      Thanx FxDreema.
      Because I cannot compile and test properly any EA since that problem.[/quote:26wq2en0]
      Thank you. The compilation is working properly now.

      posted in Questions & Answers
      S
      samdeka
    • RE: MT4 compilation problem "array passes by reference only"

      __I was reported about the "New order error" and I fixed it. It has nothing to do with the other warnings, but I will check those warnings anyway, I don't like warnings about arrays :)[/quote:obi3sl9j]
      Thanx FxDreema.
      Because I cannot compile and test properly any EA since that problem.

      posted in Questions & Answers
      S
      samdeka
    • RE: MT4 compilation problem "array passes by reference only"

      When I put a "&" in front of the indexing variables, the compilation is right, but when I use the strategy tester,
      I get a lot errors oh the journal, and I dont get any proper results.
      How can I solve it?
      (Formely, I had not any problem with the compilation on Metaeditor and the strategy tester. Its only today that I get it).

      Thanx

      ......
      Tester Strategy journal errors messages.jpg

      posted in Questions & Answers
      S
      samdeka
    • RE: MT4 compilation problem "array passes by reference only"

      Hello everyone.
      Please when I compile my fxdreema EA, MetaEditor display the message warning "array passes by reference only".
      This message is display 3 times and linked to certains lines of the code.
      How can I solve it, because the strategy tester does not give proper results because of it.
      Thank you.

      ......
      MT4 error message.jpg

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __That is good to hear!

      By the way, you will soon have a shortage of connections (theres a limit of 10 in the free version). You can spare one with replacing the "close losable trades" with a stop-loss value in the "buy now" block. Also, chaining the blocks to each other has the same effect as the "AND" block.

      Edit: Found a little flaw in your setup.. It only closes losable trades when "if trade exists" is false = no trade exists, so it holds the trades open until it turns profitable or your equilty reaches 0 and a stop-out occurs 😕[/quote:4rxfg30j]

      Thanx. I will check you advices and reply you back.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      ____I noticed you already have "no trade is running" block in your ea, so the logic is fine, the condition blocks just happen to give a lot of opening signals.
      I would use "close profitable positions" instead of just "close trades" and set a minimum profit, and also a minimum loss to the "close losable positions" block.[/quote:3smng7up]
      Thank you so much roar for your advice, I will test it.[/quote:3smng7up]
      Wooohh, its working.
      The small loss have disappeared. the EA is working. Not exactly as I want, but its working.
      Thanx a lot.
      So Lets go to improve it.

      Very very happy.
      Thanx everyone for your kindly help and advice.

      This is the link https://fxdreema.com/shared/x6vjgwcxe

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I noticed you already have "no trade is running" block in your ea, so the logic is fine, the condition blocks just happen to give a lot of opening signals.
      I would use "close profitable positions" instead of just "close trades" and set a minimum profit, and also a minimum loss to the "close losable positions" block.[/quote:21kudnul]
      Thank you so much roar for your advice, I will test it.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I can explain it to you,

      You can search this block: "No trade is running" then put it on the top of the designe and connect it to the next block that was at the top, for example a condition block. The main thing is that this block has to be placed at the top of the procces wich opens the trades.

      Also yo have to use the orange output to no trade running or the yellow output to the oposite situation.

      I hope it was useful[/quote:gwkkx8ly]

      Thanx. I will test it and give you back the results.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I use to avoid the small loss problem with "no position is running" block and and set the minimum profit and loss a few pips from open..[/quote:16lhmjx5]

      Excuse me but I dont get properly your explaination.
      How can I use the "no position (trade/pending order) is running block" if a trade is already opened?
      Actually, I would like that if a buy order is opened, no other order should be open again, until the close condition be executed,
      whatever the following ticks.
      Is there a particular block, to stop other trades, if one is already existing or pending?
      Or how can I set such parameters?
      Do you have an example with "no position is running" block?

      Thanx again

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I think the problem is that CCI can go above 100 and below 100 few times in the same candle. You know that the indicator value for the current candle is always moving up and down, it's not fixed. To create a trade you also have Stochastic, but to close it - only CCI, and CCI is free to go anywhere after the trade is created.[/quote:3dzp4oza]

      Thank you for your response.
      Indeed, CCI goes up and down many times in the same candle. That is why I use the two indicators CCI and Stochastic with specific parameters,
      to send the buy order and make sure that, CCI will not go under 100 immediately.
      Moreover, I chosed the close price of the current candle, to send the buy order, and make sure that the profit will be get until CCI < 100.
      This strategy with 2 indicators, should avoid false buy signals on each tick (I checked it visually when I was designing the strategy).

      But the real problem that I want to understand is why on each tick, even if CCI is still > 100 and stoch (K x>D), a buy order is opened and
      immediately closed, whereas, CCI is not < 100. Normally, while CCI is not < 100, no close order should be send.
      But at each tick, when CCI (14) is still > 100 and stoch(14-5-5) (K x>D), a buy order is sent, and immediately closed at the next tick, even if
      CCI is still > 100.
      How can I avoid these close of buy trades? Is it possible de fix only one opened trade, in spite of others ticks, until CCI< 100?

      Thanx. Waiting for your advise.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __But you have block 7 directly after "If trade...", no conditions are checked and the trade is closed if CCI is.... whatever it is.[/quote:19b467ap]
      Thanx for your response.
      Actually, I did not use the block "close losable trades" formely after the condition "If trade...".
      The fact is that, even if the block "close losable trades" is not there, i get still a buy order at each
      tick when CCI > 100 and stock (Kx>D). I wanted to avoid these losses with "close losable trades" but
      without ou with this block, I get the same results.
      So (maybe I dont understand properly english because I speak french), but what block, parameters condition
      or filter can I use, to send only one unique buy order when CCI > 100 and stock (Kx>D), and avoid any
      other buy orders whatever the following ticks, until CCI becomes < 100, and the unique buy order be closed.
      That is my real question, because I tried a lot of combination to make it, 😢 , but its not working properly
      as I want.

      Thank you for your advice again.

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      __I guess these are trades with loss > 1 pips. You open a trade in the first group of blocks, and right after that you have "Close losable trades". Trades are losable right when they are opened, how much... depends on the spread at that moment :)[/quote:2rao6y07]

      Thanks for your response.
      Actually, i put the block "close losable trades" because previously, when tle block "Buy now" is active, i had always
      these successives losable buy orders on each tick. And I thought that "close losable trades" would stop the others buy orders.
      Mr real wish, is that when the buy trade is opened at CCI>100 and Stock (Kx>D), no other trade must be open again, until we get
      the close order condition (CCI<100). I wish only one active open trade from the open to close condition.

      How can I make it please?

      Thanx

      posted in Questions & Answers
      S
      samdeka
    • RE: How to avoid losses at each tick?

      Hello Fxdreema.
      I was busy for professionnal stuff and now i am more free to have a time for trading.

      Please I would like that you help me to understand and improve the implementation of my EA.
      This time I made a simple EA which open a buy order when the value of CCI (14) > = 0 and
      Stochastic (14,5,5) with K crosses up D.
      Each Buy trade should close when CCI(14) becomes < 100.
      The EA should check those condition on every ticks event in timeframe H1.
      You can check the parameters here https://fxdreema.com/shared/lX2GKBYT
      The problem is that, when I test it on MT4, its not working properly as I want.
      The cute problem is that when the buy condition is OK (CCI+Stoch), on every tick
      a buy order is opened and immediately closed. That involves successive small
      losses on every tick, before getting a profit according to the open condition.
      Up to get the close condition (CCI<100).
      So, how did I get all these small losses on every tick, and how can I avoid them?

      I use a "close losable trade" block to avoid them, but there is no effect.
      Pleased find attached some MT4 Test results in H1 with EURAUD currency for the 6 last
      months and 1000 $ account balance (tick reports showing a succession of losses on every
      tick surrounded in red and matching graphic).

      Thank you.

      ......
      succession of losses on every tick euraud.jpg
      graphic euraud test.jpg

      posted in Questions & Answers
      S
      samdeka
    • RE: EA BASED ON CCI AND STOCHASTIC

      Thanx.

      posted in Questions & Answers
      S
      samdeka
    • RE: EA BASED ON CCI AND STOCHASTIC

      Thanx fxdreema.
      I will check what is going with this ea.
      Please fond attached the beginning of the results reports.
      It will give you maybe more data to advise me for my ea.
      Thanx

      ......
      wrong results ea.jpg

      posted in Questions & Answers
      S
      samdeka
    • 1
    • 2
    • 1 / 2