Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I've tried to translate this indicator from another language.
It loads up OK but it won't refresh at the next new bar and subsequent bars.
Any help would be most welcome.
Hi guys i have been trying for the last three days to get this expert advisor to execute long trades in mt4 with no success. it only executes short trades even though the signal_buy is there . please could anyone have a look at this code and fix it for me or tell me what to do. i'm new to programming and built it from an online strategy builder. thanks in advance!
I am not sure about the -3 shift parameter : it shift the curve to the left, so the current bar is undefinited. Try to replace all -3 by 0 to see if the buy orders are triggered.
I would replace
Michel, thanks a lot for your help, that fixed it perfectly! you guyss are the best, i can finally get some rest. I'll let you know how my testing turned out.
oh by the way, r u saying that -3 will never be able to work in this expert advisor? thanks again.
... oh by the way, r u saying that -3 will never be able to work in this expert advisor? thanks again.
To tell you the truth, I never really understood the use of this shift : if you want to know the value of an indic 3 bars before the current bar, just use 3 as shift, but the last one; the first one just shift the drawing of the curve, and if you use a negative value, it's like the past is knowing the future...
Anyway I would be happy that someone explain me it's use !
But to answer your question, try to know the exact strategy you want to follow, from where comes that -3 ?
I have some code below: StopLoss=EMAtrend-iClose(NULL,0,1);
TakeProfit=StopLoss
If(EMAshort>EMAlong && EMAshort_prev<EMAlong_prev)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,0,Ask+StopLoss* Point,Bid+TakeProfit*Point,"Buy at close price",10000,0,Green);
}
If(EMAshort<EMAlong && EMAshort_prev>EMAlong_prev)
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,0,StopLoss,Bid +TakeProfit*Point,"Sell at close price",11000,0,Red);
}
The idea were:
1. Open order at close price when criteria met;
2. I want to make the EMAtrend to be the stoploss level;
3. The distance between EMAtrend to Close price bar will be the distance for takeprofit from opened price
I try the code above but nothing happen and there is an error 130.
What I am wanting to know is if there is an easy way to fix this.
I'm no good at coding , only copying and pasteing.
Thanks in advance
Basza
You can define TradeSymbol as string on global scoop, but there you cannot evaluate the function Symbol(). So replace all "TradeSymbol" by "Symbol()", or assign the value in the init() or start() function like this:
Hi i was trying to program an ea, and i followed your course (very intresting!)
I know quite well how to program in java and some c++
I was trying to program an ea with brain trend indicators the idea behind is
when brainTrend2stop and braintrend1stop DOTs are present buy (and viceversa)