Hi, experimenting with EA where one indicator directly changing the setting of another, not via externals... It do not work even with simple std indicators. Even a simple direct change of setting, see code, will cause the problem. Seems everytime the
I have some indicator problems, dunno how to describe it, its pretty confusing, been struggeling with this for over a week ! I have used up all line buffers (7 of them), and are using a good number of so called work arrays, these are arrays which are
Is it possible to draw a rectangle where the sides are not attached to the normal descrete X coordinates (candle wicks) ? I'd like a 1 bar wide rectangle that is X-skewed by o.5 bar. See picture: Yellow is a rectangle object , Red is how I'd
Hi, working on a new EA idea. This is long term trading, where trades last something like 50 - 500 bars. Therefore I have no interest in intrabar ticks, even Trailing Stop is done from bar to bar. And this Ea is slow in processing so testing
Hi, got this indicator code working somewhat, it is run even when mouse scrolling the chart. The indicator data has a wide range, something like +/- 0.1...+/-5.0, depending of chart scale, TF and instrument. The goal is to improve readability by: A)
Is higher timeframe data looking into the future? Obviously not when forward testing! But how about when backtesting ? Lets say we're running an EA backtest on 1H, in the middle of the day, a few weeks in the past. The EA uses some MTF indicator. At
EA may have several market orders open at any time, each order has its own indicator set stoploss value. To trail the same fixed distance from market for an order with SL = 10pips, and one with SL = 150pips is just "stupid". Trailing must be done
Hi, to make it easier to develop and work with the EA code I want to hide away simple standard functions that are fully finished. In the file I put only the functions, like this: //+------------------------------------------------------------------+
Lets say we place a Long order without stops. After a few minutes the price falls and it goes into deep drawdown. The price then settles a few hours later, and we want to place a SL on that old order that is far away both in time and price.....Can't
Hi, after sending a market order without stops I call this function to place SL and TP... both at once but failing that (in part or in full) the stops are to be placed in later passes until both SL and TP are in place. Problem is that I'm getting E
Any suggestions on this, before I stray into a dead end ? //------------------------ void ModifyPending() { // The globals PriceBuy, SL_BUY are generated by indicators etc and may not always be 'sensible', especially in
Hi, have a look at this code example: for ( int i = 0 ; i < OrdersTotal (); i++) { if ( OrderSelect (i, SELECT_BY_POS, MODE_TRADES) == FALSE) break ; //If no
Hi, Working on TF 5M I want to know a little of whats going on higher TF, like 1H and 1D. Eg. I want to know the day's high, and previous day's high.. simple: int ToDaysHighestPrice = iHigh ( NULL
I've always believed that if I'm on say TF 5M, and measure the High on bar0 of a higher TF like 1D... I would get today's high as seen at the end of the day... IOW I would be looking into the future. But this is not what is happening. What I get is
Is it possible to find which order has been selected elsewhere? I'm inside the typical OrderSelect loop, then call a function which also runs through such a loop, and when returning I've lost track of the order that was selected in the 1st loop. I
Hi, struggling with MT4's slow BT execution, MT4 only uses 12% of 1 of the proc's 8 cores...my testruns take forever. Have anyone tried running MT4 in a virtual machine , maybe there is a tweak so it can utilize more of the available processor power