Are you 100% sure the ask price never went below the open price? Your ea works tick by tick, so even 1 tick of low ask price triggers your buy.
Remember, there is usually some slippage in the order, you don't get precisely the price you wanted (when buying the market price)
Posts made by roar
-
RE: I thoght it was correct, instead...what's wrong??posted in Questions & Answers
-
RE: Avarage of indicator signals to place buy/sellposted in Questions & Answers
@migen
https://fxdreema.com/shared/BNcQoJLzb
This is how I would do it.. Hope you are comfortable with variables
-
RE: Find recent High/Low with specific conditionsposted in Questions & Answers
Oh, yeah, that connection is not very clear in my picture
-
RE: Find recent High/Low with specific conditionsposted in Questions & Answers
I'm fairly sure you can put as many spaces as you want, if its a math operation
-
RE: Find recent High/Low with specific conditionsposted in Questions & Answers
@drayzen oops, youre absolutely right, the IDs go in the wrong way in my example. I should sleep more

https://fxdreema.com/shared/XYqEDtP9c
Here's the fixed blocks, but I'm sure you already got the idea. -
RE: Find recent High/Low with specific conditionsposted in Questions & Answers
Hello!
Maybe some loop works, like this:

It first looks for candle ID 1, and then compares it to ID 2 and then ID 2 to ID 3. If conditions are not met, ID 1 becomes ID 2 and the loop continues from there until it finds what it is looking for.
Be careful though, loop like this doesn't have any "expiration", so if it doesnt find what it looks for - your metatrader crashes. Thats why I put block # 6 there, to limit the loop.
-
RE: Condition for loosing trades...posted in Questions & Answers
You're welcome.
My own opinion: previous trades can't affect your future ones, they don't have any valuable information to the new trade entry.
This is also why I don't use fixed targets, I always open and close by the chart analysis and nothing else. -
RE: activate a condition for four 4H candles onlyposted in Questions & Answers
You need to learn variables, and use 2 of them:
one variable as a trigger (for example, "trigvar=1" when activated and "trigvar=0" when deactivated)
and other variable to keep track of time (on every bar, "barcount=barcount+1")
To stop your process: if "trigvar=1" then check if "barcount > 4" -> if true, "trigvar=0"It probably looks difficult, but I trust you will find how to do it

-
RE: Problem with timestamp value input inside MT?posted in Questions & Answers
You just need to have a connection to somewhere. Alone blocks don't execute.
Just put a pass-block before or after the draw. -
RE: How to open next order after 5 bars if there is already open order and conditions are met, so there won't be a lot of open trades???posted in Questions & Answers
Sure, here's how to create the variable and how the logic goes.
https://fxdreema.com/shared/5XfmFTFbb


-
RE: How to get the values sent to the broker server?posted in Questions & Answers
I dont think any EA has access to the terminal behavior, I might be wrong though..
Your problem probably is because your broker doesn't allow super-small stops - try some bigger stops, does them work?
Another workaround would be to use virtual stops - don't tell your broker the stop levels, just use some variables and automate the closing in the EA.
-
RE: EA Conditions to fullfill in sequenceposted in Questions & Answers
You need a variable to remember the earlier events, lets call that track.

-
RE: Draw Text clean upposted in Questions & Answers
This same method applies to all objects:

- A = NO
- B = YES
- Give your object some name
-
RE: I do this, but it does not workposted in Questions & Answers
Your metatrader probably doesn't use that format, "EUR/USD" - its usually "EURUSD"

-
RE: Here we go again. Its not just me.posted in Questions & Answers
So, what is the problem here?
I think tp=0 means no tp at all.
Do you have any blocks controlling the exit, a time limit for example? -
RE: Entering trades based on object on charts (lines drawn by indicator)?posted in Questions & Answers
I think this will work about right:

Notice the different "route" for exit - if your exit condition was after the buy, the trades would close instantly after opening (or not at all).
https://fxdreema.com/shared/WolKfEaEc -
RE: How to set a break even at?posted in Questions & Answers

- This should be "lower band", yes?
- Connect those formula blocks to something (anything), every block needs a connection, otherwise it will never run.
- Be careful when working with both pips and price values. This formula will give you something like 0.0000123 -> you need to multiply it by 10000 to get pips.
-
RE: Simple MACD Histrogram EA isn't workingposted in Questions & Answers
Try working with candle id 1 instead of 0, maybe that helps.
In my opinion, that macd arrow is probably some simple calculation anyway, so it would be easier to just work with the default MACD indicator -
RE: Suddenly my EA stopped working...posted in Questions & Answers
Does it give any errors to the journal?
