| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
||||
|
I want to learn how to use this tool. http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/
I made a EA and compiled it and got these 6 errors... '.' - initialization expected C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (16, 22) '1' - comma or semicolon expected C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (16, 23) 'Lots' - variable not defined C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (179, 44) 'Lots' - variable not defined C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (187, 47) 'Lots' - variable not defined C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (206, 44) 'Lots' - variable not defined C:\Program Files\Interbank FX Trader 4\experts\macdstochma5m.mq4 (214, 48) would someone assist me in correcting these errors, I just learned how to compile but I don't know how to code. here is the code ... //+------------------------------------------------------------------+ //| This MQL is generated by Expert Advisor Builder | //| http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ | //| | //| In no event will author be liable for any damages whatsoever. | //| Use at your own risk. | //| | //| Please do not remove this header. | //+------------------------------------------------------------------+ #property copyright "Expert Advisor Builder" #property link "http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/" extern int MagicNumber = 0; extern bool SignalMail = False; extern bool EachTickMode = False; extern double Lots = .1; extern int Slippage = 3; extern bool StopLossMode = True; extern int StopLoss = 12; extern bool TakeProfitMode = True; extern int TakeProfit = 90; extern bool TrailingStopMode = True; extern int TrailingStop = 12; #define SIGNAL_NONE 0 #define SIGNAL_BUY 1 #define SIGNAL_SELL 2 #define SIGNAL_CLOSEBUY 3 #define SIGNAL_CLOSESELL 4 int BarCount; int Current; bool TickCheck = False; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { BarCount = Bars; if (EachTickMode) Current = 0; else Current = 1; return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { int Order = SIGNAL_NONE; int Total, Ticket; double StopLossLevel, TakeProfitLevel; if (EachTickMode && Bars != BarCount) TickCheck = False; Total = OrdersTotal(); Order = SIGNAL_NONE; //+------------------------------------------------------------------+ //| Variable Begin | //+------------------------------------------------------------------+ double Buy1_1 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 2, 1, 0, 1, Current + 0); double Buy1_2 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 5, 1, 0, 1, Current + 0); double Buy2_1 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 9, 1, 0, 1, Current + 0); double Buy2_2 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 9, 1, 0, 1, Current + 1); double Buy3_1 = iMACD("EURUSD", PERIOD_M1, 4, 9, 7, PRICE_CLOSE, MODE_SIGNAL, Current + 0); double Buy3_2 = iMACD("EURUSD", PERIOD_M1, 4, 9, 7, PRICE_CLOSE, MODE_SIGNAL, Current + 1); double Buy4_1 = iMA("EURUSD", PERIOD_M1, 2, 0, MODE_EMA, PRICE_CLOSE, Current + 0); double Buy4_2 = iMA("EURUSD", PERIOD_M1, 5, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double Sell1_1 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 2, 1, 0, 1, Current + 0); double Sell1_2 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 5, 1, 0, 1, Current + 0); double Sell2_1 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 9, 1, 0, 1, Current + 0); double Sell2_2 = iCustom("EURUSD", PERIOD_M1, "StepMA_Stoch", 9, 1, 0, 1, Current + 1); double Sell3_1 = iMACD("EURUSD", PERIOD_M1, 4, 9, 7, PRICE_CLOSE, MODE_SIGNAL, Current + 0); double Sell3_2 = iMACD("EURUSD", PERIOD_M1, 4, 9, 7, PRICE_CLOSE, MODE_SIGNAL, Current + 1); double Sell4_1 = iMA("EURUSD", PERIOD_M1, 2, 0, MODE_EMA, PRICE_CLOSE, Current + 0); double Sell4_2 = iMA("EURUSD", PERIOD_M1, 5, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double CloseBuy1_1 = iMA("EURUSD", PERIOD_M1, 2, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double CloseBuy1_2 = iMA("EURUSD", PERIOD_M1, 5, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double CloseSell1_1 = iMA("EURUSD", PERIOD_M1, 2, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double CloseSell1_2 = iMA("EURUSD", PERIOD_M1, 5, 0, MODE_SMA, PRICE_CLOSE, Current + 0); //+------------------------------------------------------------------+ //| Variable End | //+------------------------------------------------------------------+ //Check position bool IsTrade = False; for (int i = 0; i < Total; i ++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { IsTrade = True; if(OrderType() == OP_BUY) { //Close //+------------------------------------------------------------------+ //| Signal Begin(Exit Buy) | //+------------------------------------------------------------------+ if (CloseBuy1_1 < CloseBuy1_2) Order = SIGNAL_CLOSEBUY; //+------------------------------------------------------------------+ //| Signal End(Exit Buy) | //+------------------------------------------------------------------+ if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) { OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen); if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy"); if (!EachTickMode) BarCount = Bars; IsTrade = False; continue; } //Trailing stop if(TrailingStopMode && TrailingStop > 0) { if(Bid - OrderOpenPrice() > Point * TrailingStop) { if(OrderStopLoss() < Bid - Point * TrailingStop) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen); if (!EachTickMode) BarCount = Bars; continue; } } } } else { //Close .....continued on next post Last edited by Aaragorn; 06-13-2006 at 06:36 PM. |
|
|||
|
Quote:
Try change Lots= .1 <> to Lots= 0.1 |
|
|||
|
CCI zero line cross
I've been searching for this on multiple net sites, googling it of course, as well as doing searches in forums themselves too for over 5 hours.
Will someone please please post an indicator of the CCI with an audio alert for when the zero line is crossed. Very simple and not to be found anywhere... ![]() thanks, Someone please post the complete code for it and not just some random words assuming I'm supposed to know where to put that bit of code or how to intertwine it with the code I already have in such a way that it'll actually work. If you want to, you can make it have arrows on the chart up top too but that isn't the main thing. Just to be able to mess around the house or play games because of the audio alert without having to stare at the chart for 12 hours a day will be plenty for me. thanks, |
|
|||
|
i have two simple questions i think..
how can i make the heiken ashi Candles be thickness of 5 by default instead of 3? everytime i bring up a new chart they go back to 3. Also, how can i make a mark above or below the candle depending on value of an RSI indicator? I understand some about programming but don't know the syntax of this...so act like i know nothing Thanks SO much..if i discover something, i'll post it ![]() PS that expert advisor builder is NICE, is there and INDICATOR builder too? that would be amazing |
|
|||
|
Hi all...
I've made an EA that trade two diffrent currencies. And I want a function that close all trades in both currencies if they both reached x amount of profit. I've tryed this example: http://www.metatrader.info/node/99 But the CloseAll() function only seems to work with the currency on the chart the EA is attached to. How do i make this CloseAll() function to work with all open trade even currencies not attached to the EA chart? |
|
||||
|
Quote:
Did you try it? |
|
|||
|
Quote:
But I didnt use any magic number for my EA, maybe thats the problem. Maybe it work if i use magic number? |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |