fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. oseiwe
    3. Posts
    O
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 23
    • Best 3
    • Controversial 0
    • Groups 0

    Posts made by oseiwe

    • RE: Positioning and referencing trade events

      OK thanks. I can see that on the surface, this is not possible.

      However as a workaround, is it possible to assign the date and time of the last trade/alert to a variable and also assign the date and time of the next MA cross to a variable, and then issue a condition that says:

      If Time of Last Sell Trade (ie VarSell) < TIme of MA cross (ie VarCross), then open a sell trade. If not, do nothing?

      This way, the EA will keep checking every tick for the next MA cross. Once this is found, it will compare the time of cross with the time of the last trade and then place a trade. However if it does not find an MA cross, no trade will be opened.

      If the above is not possible, then I guess I would have to give up 😞

      Regards

      posted in Questions & Answers
      O
      oseiwe
    • RE: Positioning and referencing trade events

      Thanks fxdreema,

      Your illustration is pretty close, but I think there is an aspect I need clarification on:

      So taking your illustration further, suppose after the MA cross and after closing any open trades, there is a further requirement for there to be another cross (say 50MA x> 100MA), but this cross does not happen until long after the initial cross, will there ever be a buy trade?

      I know the above sounds confusing. Let me try to explain further:

      Let's say we have the below requirement (similar to yours):

      1. Check that there are no trades
      2. Wait for 1MA to cross 5MA
      3. Close all open trades
      4. Wait for 10MA to cross 20MA
      5. Open BUY trade

      Now suppose 1, 2, and 3 occur at 10am, but 4 does not occur until 5pm that same day, will the BUY trade still be opened? In other words, after condition 2 has been met and step 3 has taken place, will the EA store the result/outcome of step 2 and 3 until the condition in step 4 is met? or will it keep looping through the steps until step 4 is met (in which case, step 2 would no longer be valid because the cross would have happened a long time ago)?

      I hope this makes sense.

      Regards
      Ose

      posted in Questions & Answers
      O
      oseiwe
    • RE: Positioning and referencing trade events

      Hi All,

      I am trying to program my ea to do the following:

      • After the previous sell trade, to NOT enter another sell trade (whether or not the previous trade has closed) until price has reverted back to the 20SMA

      Because price could revert back to the 20SMA at any time (provided it does so after the previous sell trade has been placed), I am finding it difficult to set up. For example I could use the "No Trade" block plus an indicator condition, but would then have to specify within what period price should touch the SMA (which defeats the purpose as I want trades to re-enabled ANYTIME price reverts back to the SMA - no fixed period).

      Hopefully I am just being silly and there is an easy way to do this.

      Any ideas?

      Regards
      Ose

      posted in Questions & Answers
      O
      oseiwe
    • 1
    • 2
    • 2 / 2