fxDreema

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

    FXB

    @FXB

    0
    Reputation
    332
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    FXB Unfollow Follow

    Latest posts made by FXB

    • RE: Maximum 2 trades per day then STOP

      Hi guys,

      I have done a search for this, and tried various options such as Less than "n" trades are running etc but I can't seem to find my answer, hope you can help.

      Quite simply I want to stop trading for the day after 2 trades. I have a Time Filter set for the day & after 2 trades I want to stop the EA from trading until the next day. I have tried various settings such as Trade loop & History trade loop but I can't seem to get it. I also tried setting flags but I can't get these to increment by 1 to count up 2 trades.

      I imagine it's very simple to do, but I'm going around in circles here! I'd be grateful if someone could be of assistance 🙂

      Thanks.

      posted in Questions & Answers
      F
      FXB
    • RE: Simulating trades outside of trading hours

      Thanks, the strategy is very basic in itself, and for the most part I have it working. There is just one element which I can't work out 😕

      This is the basic premise for a Sell trade:

      I only want trade from 12:00 until 19:30 so

      Set Start Time 12:00
      Set End Time 19:30

      At 12:00
      Check no trades are running
      Check Condition MA10<X MA33
      Check Condition Candle1 High < MA10
      Check Condition Candle0 < Candle1

      If all conditions are met
      Sell 1 lots, no SL/TP
      then

      If trade is running
      Check Condition MA10>X MA33
      Close Trade
      Or
      At 20:00 Close all trades

      This part works fine, however it is the next part which I cannot work out. I am attempting to use "Start History Trades Loop", however as I'm not actually placing any trades 20:00-12:00 I don't think I can use this option (as there are no actual trades during these times).

      This is what I would like to do:

      At 12:00 (once every day)

      Check to see if there has been a valid signal in the last 5 hours (i.e all trade conditions met), and there hasn't been an MA Cross since this signal.

      If Yes
      wait for the next MA Cross before entering a trade.
      If No
      take the next available trade.

      So my thinking would be that at 12:00 I need to check for any historic trades in the last 5 hours, and if there is a trade setup in progress then wait until the MA's Crossover to signal a new trade. To do this I have tried this:

      Once a Day at 12:00
      Start history trades loop
      (in loop) Check trade/order age for trades newer than 5 hours
      If there is a trade in the last 5 hr
      set flag to Y
      else
      set flag to N

      I have then included in my trade criteria an option:

      Check Flag
      If set to Y then Stop
      If set to N pass through and trade as normal

      I think the Time Filter may be causing this to fall over, as trades are not being placed outside my trading hours, so perhaps I need an option to identify all trades and a seperate option to only activate a Sell where it is inside my trading hours, but then I don't know how it would then identify these previous setups at 12:00 when my trading starts.

      Hope that makes sense.

      Cheers.

      posted in Questions & Answers
      F
      FXB
    • RE: Simulating trades outside of trading hours

      I have tried every possible combination I can think of & am now going around in circles....!

      "Start History Trades Loop" is the one I think I should be using, and I am setting flags where there is a trade within the last 5 hours, but I can't seem to get it to work at all. This is where I have got to, I have no doubt over-complicated the whole process but am now at a loss as to what else I need to do http://fxdreema.com/shared/77kfTakPc.

      Could someone take a look & give me some advice please?

      Cheers.

      posted in Questions & Answers
      F
      FXB
    • RE: Simulating trades outside of trading hours

      Interesting about the MA Crossover, I have updated this & also the Time Filter, thanks.

      I have tried the Candle ID but it still doesn't make sense to me, maybe I'm being a bit slow! I understand that Candle ID 100 would give me the value of the 100th previous candle, but how can I check, for example if there was a trade in the past 5 hours using this, without entering 99/98/97 etc. I assume there is a quicker way but am at a loss how this can be done? I am thinking to use Set Flag true/false to tell me if I am "in" a trade already at my starting time (to avoid entering), but I can't understand how the program would "back-test" this to set my flag accordingly.

      Thanks.

      posted in Questions & Answers
      F
      FXB
    • RE: Simulating trades outside of trading hours

      Thanks, that makes sense.

      I've had a go at various different setups but can't get any to work properly, any chance you would be able to have a look and give me a few pointers?

      I can't seem to get it to analyze the previous "n-th" candles as you have described.

      This is a basic version of a Sell Trade, any help would be greatly appreciated http://fxdreema.com/shared/XCPQRnAWc

      Cheers.

      posted in Questions & Answers
      F
      FXB
    • RE: Simulating trades outside of trading hours

      I have searched but can't seem to find if there is any option for what I want to do, I wonder if someone can help.

      I am using an MA Crossover strategy with confirmation of the trade by using a candle pattern before entry. But I only want to trade during certain hours.

      Now what I would like to do is this: lets say my trading hours are 1300-1700, if there is an MA Crossover at 1200 followed by my signal candle pattern at 1230 then I effectively have an "active" trade, albeit outside my trading hours. What I don't want to do is enter this as a "late entry" at 1300 (start of my trading hours) as I have now "missed the boat" on this trade. I would like to wait for the next MA Cross then signal before trading. However if there has been an MA Cross at say 1250 but no signal I would like to enter a trade after 1300 without waiting for a further cross.

      Hope this makes sense, I would effectively like the EA to still recognise all trades but just not enter a trade other than in my specified trading hours.

      posted in Questions & Answers
      F
      FXB
    • RE: Buy Entry 1 pip above candle for confirmation

      I've just tried this.... and it works a treat!

      Thanks a lot for your help Dreema, you provide an excellent service here.

      Cheers 8-)

      posted in Questions & Answers
      F
      FXB
    • RE: Buy Entry 1 pip above candle for confirmation

      Thanks, I'm not sure I follow, do you mean there is a minimum time of 10 minutes?

      If so do you know any work-around to set my Sell Stop to cancel after 5 minutes, perhaps adding some variable in there?

      EDIT - I think I can do this by implementing "Delete each pending order" to run at the open of the 2nd bar after my Sell Stop. Just need to figure out how to do it now 🙂

      posted in Questions & Answers
      F
      FXB
    • RE: Buy Entry 1 pip above candle for confirmation

      Thanks Dreema, I have nearly got it working I think.

      One final issue I have is that where I set for example a Sell Stop 1 pip below I want this to cancel if it is not triggered by the next candle. So I set the expiration as 5 mins (I am using 5M chart). However this does not always seem to work, sometimes it doesn't trigger the trade even though the next candle went lower & should have triggered the Sell.

      I think this relates to me using 'On Tick', ideally I would like an option to just "Cancel after 1 bar" instead of "5 mins"

      Any ideas where I am going wrong?

      Thanks for your help.

      posted in Questions & Answers
      F
      FXB
    • RE: Buy Entry 1 pip above candle for confirmation

      I wonder if someone can help me with this please. What I want to do is enter a Buy 1 pip above the last candle if the current candle goes above this value, then if the trade is not triggered wait for the next signal (which could be the next candle along, or may not be).

      I have managed to set this up whereby Candle(0) Close > Candle(1) High and this works fine, however on the SP500 (due to the 2/3 pip increments) this will enter 2/3 pips above the high of the previous candle, whereas I would like this to enter 1 pip above, presumably by using a Buy Stop/pending order. But I am not having much luck in implementing this. I am loathe to miss out on 1 or 2 pips on each trade needlessly!

      I understand that if the current candle opens above the previous candle that I will have to enter immediately (2/3 pips above) & would also like to implement this, however in most instances this does not happen.

      Any help would be most appreciated.

      posted in Questions & Answers
      F
      FXB