fxDreema

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

    Topics created by valetas

    • V

      emailing
      Questions & Answers • • valetas

      11
      0
      Votes
      11
      Posts
      1846
      Views

      fxDreema

      After the backtest everything you see is from the last moment of the candle. And when you values to detect signals from the current candle, they are temporary, especially in the beginning of the candle (when Once per bar is on the top). When Once per bar is below the conditions, then you work with the middle of the current candle. To work with finished candles, set Candle ID to 1 everywhere. In this situation I got this: http://prntscr.com/2loqu5

    • V

      close trade after cross
      Questions & Answers • • valetas

      2
      0
      Votes
      2
      Posts
      961
      Views

      fxDreema

      Everything starts with the tick, an EA basically works on every tick, on every tick it checks something, it does somethig. No ticks - no actions at all. And when you place blocks under "on Tick", they will be exexuted and they will work. So what blocks to place there?

      How to know when EMA5 is below EMA10? There is a "Condition" block for this. Do you need to check this on every tick - then connect other blocks below this one, so there will be nothing above it that will stop it for working on every tick. Do you need to check this condition sometimes, for example on every new bar - then place "Once per bar" above it.

      Now that you know when EMA5 is below EMA10... you want to close all trades? There is a block called "Close trades". Just place it below that "Condition". And again, how often do you need that block to be executed? Place conditions or filters above it to make it work only when you want to.

      There are very few basics when creating an EA. The first one is what I mentioned - there is an TICK event and the main code is executed on every tick. Because there is no need to do it more often or not so often, market changes because of ticks so ticks rule everything. Then... the EA contains conditions, filters and actions. Filters are basically conditions, so everything is conditions followed by actions, and those conditions are run on every tick.

      Tick -> Condition (and filters) -> Actions

    • 1 / 1