Hi Guys,
Anyones able to spot out the mistakes?
What have you tested ? what exactly doesn't work ? placing order, just placing one at a time ? can we see the Indicators ?
Found the Indicator . . . it has these Externs
extern int RSI_Period = 13; //8-25 extern int RSI_Price = 0; //0-6 extern int Volatility_Band = 34; //20-40 extern int RSI_Price_Line = 2; extern int RSI_Price_Type = 0; //0-3 extern int Trade_Signal_Line = 7; extern int Trade_Signal_Type = 0; //0-3
when you use iCustom you have to pass all the Externs . .
https://docs.mql4.com/indicators/iCustom
double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)
Found the Indicator . . . it has these Externs
when you use iCustom you have to pass all the Externs . .
https://docs.mql4.com/indicators/iCustom
double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)
>>you have to pass all the Externs . .
Are you shure? i have the sensation, if i dont pass something of the parameters its calling the iCustom with the default settings of the indicator...
>>you have to pass all the Externs . .
Are you shure?
Nope, not sure . . . try it an d see if it works . . .
Thanks for quick replies.
I've just tried to give all parameters by the iCustom call, but it doesn't change the problem. I ran it in the strategy tester and it doesn't do any trade. It just gives me the "#130 Order failed" in the journal.
What also figured out, is that it doesn't show the 'buy phase' comment even if the green line is above the red line... This might be a sign for the mistake.
TDIred = iCustom(Symbol(),PERIOD_M1, "TDI Red Green",13,5,0); TDIgreen = iCustom(Symbol(),PERIOD_M1, "TDI Red Green",13,3,0)
- You have to pass ALL externs as others pointed out.
- You have to select which buffer (mode) before the shift (0)
- 130 is a separate problem. EAs must adjust for 4/5 digit brokers. 25*point is 2.5 pips on a 5 digit broker less than MarketInfo(Symbol(), MODE_STOPLEVEL)*Point (30 points 3.0 pips on IBFX) On ECN brokers you must open first and THEN set stops.
//++++ These are adjusted for 5 digit brokers. int pips2points; // slippage 3 pips 3=points 30=points double pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
What also figured out, is that it doesn't show the 'buy phase' comment even if the green line is above the red line... This might be a sign for the mistake.
Are you on a 5 digit broker ? if you are your SL is only 2.5 pips and may be too close . . also your sell order should be at Bid move your SL and TP further away and test . . .
Error 130:
ERR_INVALID_STOPS, 130, Stops are too close, or prices are ill-calculated or unnormalized (or in the open price of a pending order). The attempt can be repeated only if the error occurred due to the price obsolescense. After 5-second (or more) delay, it is necessary to refresh data using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.
Are you on a 5 digit broker ? if you are your SL is only 2.5 pips and may be too close . . also your sell order should be at Bid move your SL and TP further away and test . . .
Error 130:
ERR_INVALID_STOPS, 130, Stops are too close, or prices are ill-calculated or unnormalized (or in the open price of a pending order). The attempt can be repeated only if the error occurred due to the price obsolescense. After 5-second (or more) delay, it is necessary to refresh data using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed.
- You have to pass ALL externs as others pointed out.
- You have to select which buffer (mode) before the shift (0)
- 130 is a separate problem. EAs must adjust for 4/5 digit brokers. 25*point is 2.5 pips on a 5 digit broker less than MarketInfo(Symbol(), MODE_STOPLEVEL)*Point (30 points 3.0 pips on IBFX) On ECN brokers you must open first and THEN set stops.
Thanks to y'all. Now it's working. Thank you sooo much!!!
Hi
I wonder if you could share the completed TDI EA bro.
Thanks
Hi
I wonder if you could share the completed TDI EA bro.
Thanks
It has been over 5 years since they posted... Good luck!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Guys,
I'm currently working on an EA.
I got an TDI Red Green Indicator. Every time there's a cross of both lines, there shall be ONE trade.
So if the red line crosses above the green line, there shall be Short trade and every time the red line crosses below the green line there shall be a long trade.
unfortunately it doesn't work, how it suppose to.
Anyones able to spot out the mistakes?
TIA,
Wez