Forum

How to know when a stoploss was hit.

Hi all, I'm looking for a piece of code that finds out if a stoploss was hit so my EA can take action. Alternatively: How can know the price at which the order closed? The real closing price; not the prefered one

Merging orders

MT4 seems to have problems with quickly entering trades. My EA picks up 1 new position every hours at most. That won't overflooding the servers I guess But when I open a new trade all open positions get instantly modified (ProfitTarget and StopLoss) This could be up to 10 positions so that probebly

Closing trades at end of candle

I'm trying a very simple system. Buy if EMA(5) crosses EMA(13) --> using opening prices Close all open positions at close of current candle or at open of next candle. Opening goes ok but somehow it never closes on the same bar. I know backtesting is flawed but not for simple OHLC data I

Things I noticed - tips thread

Surely everyone has noticed some things when studying systems and charts. But not always that observation is put into a system. Sharing such observations can be useful I think. Just small and insignifictant tips that you normally wouldn't start a thread about

Lets tweak this system a bit

Finally, my first working system in MT4. Results are very nice. But there are a few problems. a] Large drawdown. Not due the nature of the system but because of some bug. b] Less than 50% of the trading opportunities are taken. (partly causes a) c] Pyramiding seems to be flawed; but that could also

Trailing stop methods

What type of trailing stop method works best for you? a] a fixed 5 pips trailing stop. b] a 10 pips stop that starts to decrease after the profit target is reached. c] a stop based on ATR. d] Time based. e] some other method you want to share. Personally I'm thinking about a combination of b and c

StepMA Stoch

Very nice indicator I found elsewhere. I'm not sure what the 'official' way of trading it is following the direction of the blue or yellow line (depending on timeframe) looks very nice. And ofcource the xovers

Double entry rules

I want to open a position if the price crosses an MA. (Buy) But once the position is open I want to add to that position if the opening price is still above the MA. That gives me 2 problems. a] How to enter 2 'buy types' in ZeroCode and making sure they are executed in the right order. b] During the

Fundamental trades

1] Find a major fundamental announcement at it's time. In this example 8:30 EST. Time is extremely important in this system! 2] Open a (1-minute) charts of the country involved. -> EURUSD 3] At 8:29 EST find the lowest low and highest high over the last 2-8 candles. -> more candles is less false

A very simple cashcow

Well I hope it's a cashcow. Visual tests are very promising. I use 1 day EURUSD. Wait until the bar (a trading day) closes. If High-Close<0.0015 then take a short trade with a 25 pip target. If Close-Low<0.0015 then take a long trade with a 25 pip target. We just lay in a market order on the todays