关闭的问题,请帮助 - 页 2 123456789 新评论 William Roeder 2010.03.12 21:19 #11 Huckleberry: 如果(1.4321-1.4361-(20*2)<=0),对不起,我不明白。 SL=1.4361-(20*2)的止损值 OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。 你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。 这发生在Bid-SL<=0时 当Bid-SL>0时,这就是初始条件。 Ben 2010.03.12 21:55 #12 WHRoeder wrote>> SL=1.4361-(20*2)为止损值 OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。 你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。这发生在Bid-SL<=0时 当Bid-SL>0时,这就是初始条件。 嗨,WHRoeder 谢谢你的回复。对表达方式感到困惑。 在我的隧道视野中,我专注于卖出方,表达式中的'='号位于表达式的左边。我将努力解决这个问题并回来。谢谢你。你所分享的时间和努力是非常慷慨的。 谢谢 Ben 2010.03.12 22:43 #13 WHRoeder wrote>> SL=1.4361-(20*2)为止损值 OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。 你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。这发生在Bid-SL<=0时 当Bid-SL>0时,这就是初始条件。 Hi WHRoeder 只是为了帮助你了解最新情况。我编辑了之前的回复。 我也把表达式插入了程序中。同样的想法有许多种解释方式。 谢谢你指出了最新的一种。但看,这个表达式并没有改变结果。 就好像,程序从来没有看过这个条件。也许它不看 "for "语句以外的内容。 我正在重新审视我的代码。 谢谢你所做的一切。 AIRAT SAFIN 2010.03.12 23:30 #14 ////////////////////////////////////////////////////////////////////< 1> // < Property > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </Property > //< > ////////////////////////////////////////////////////////////////////< 2> // < Content > //< > // //< > // < Structure 16 elements in 4 domains > //< > // < 1. Data 8 elements in 2 domains /> //< > // < 2. Code 8 elements in 2 domains /> //< > // </Structure 16 elements in 4 domains > //< > // //< > // < 1. Data 8 = 5 i 3 d - s > //< > // < 1.1. Input 7 = 4 i 3 d - s /> //< > // < 1.2. Buffer 1 = 1 i - d - s /> //< > // </1. Data 8 = 5 i 3 d - s > //< > // //< > // < 2. Code 8 / i 70 l 3 o > //< > // < 2.1. Interface 5 / - i 63 l 3 o /> //< > // < 2.2. Special 3 / - i 7 l - o /> //< > // </2. Code 8 / i 70 l 3 o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // </Content > //< > AIRAT SAFIN 2010.03.12 23:31 #15 ////////////////////////////////////////////////////////////////////< 3> // < 1.1. Data : Input > //< > // //< > // < 1.1. Input 7 = 4 i 3 d - s > //< > // < 1. Strategy 4 = 2 i 2 d - s /> //< > // < 2. Trading 3 = 2 i 1 d - s /> //< > // </1.1. Input 7 = 4 i 3 d - s > //< > // //< > // < 1. Strategy 4 >=========================================//< > int iBasePeriod = 20 ; //< > int iBaseBar = 1 ; //< > double dFactorTP = 2.0 ; //< > double dFactorSL = 2.0 ; //< > // </ 1. Strategy 4 >=========================================//< > // //< > // < 2. Trading 3 >==========================================//< > int iSlippage = 1 ; //< > int iMagic = 1 ; //< > double dLots = 0.1 ; //< > // </ 2. Trading 3 >==========================================//< > // //< > // //< > // //< > // </1.1. Data : Input > //< > ////////////////////////////////////////////////////////////////////< 4> // < 1.2. Data : Buffer > //< > // //< > // < 1.2. Buffer 1 = 1 i - d - s > //< > // < 1. Exception 1 = 1 i - d - s /> //< > // </1.2. Buffer 1 = 1 i - d - s > //< > // //< > // < 1. Exception 1 >========================================//< > int iTrap ; //< > // </ 1. Exception 1 >========================================//< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </1.2. Data : Buffer > //< > AIRAT SAFIN 2010.03.12 23:31 #16 ////////////////////////////////////////////////////////////////////< 5> // < 2.1. Code : Interface > //< > // //< > // < 2.1. Interface 5 / - i 63 l 3 o > //< > // < 1. iSignalOpen - i 12 l 1 o /> //< > // < 2. iSignalClose - i 12 l 1 o /> //< > // < 3. iGetTrade - i 11 l 1 o /> //< > // < 4. iTryOpen - i 14 l - o /> //< > // < 5. iTryClose - i 14 l - o /> //< > // </2.1. Interface 5 / - i 63 l 3 o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </2.1. Code : Interface > //< > ////////////////////////////////////////////////////////////////////< 6> // < 2.1.1. Code : Interface : iSignalOpen > //< > // //< > int iSignalOpen () // - i 12 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > int iIndexH = iHighest ( 0 , 0 , MODE_HIGH , iBasePeriod , //< > iBaseBar ) ; //< > int iIndexL = iLowest ( 0 , 0 , MODE_LOW , iBasePeriod , //< > iBaseBar ) ; //< > // //< > double dHigh = High [ iIndexH ] ; //< > double dLow = Low [ iIndexL ] ; //< > // //< > double dAsk = MarketInfo ( Symbol () , MODE_ASK ) ; //< > double dBid = MarketInfo ( Symbol () , MODE_BID ) ; //< > // //< > if ( dAsk > dHigh ) iResult = OP_BUY ; //< > if ( dBid < dLow ) iResult = OP_SELL ; //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.1. Code : Interface : iSignalOpen > //< > AIRAT SAFIN 2010.03.12 23:31 #17 ////////////////////////////////////////////////////////////////////< 7> // < 2.1.2. Code : Interface : iSignalClose > //< > // //< > int iSignalClose () // - i 12 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > double dATR , dDelta , dLoss , dProfit ; //< > // //< > dATR = iATR ( 0 , 0 , iBasePeriod , iBaseBar ) ; //< > dDelta = OrderClosePrice () - OrderOpenPrice () ; //< > // //< > if ( OrderType () == OP_BUY ) //< > { dProfit = dDelta ; dLoss = -dDelta ; } //< > else if ( OrderType () == OP_SELL ) //< > { dProfit = -dDelta ; dLoss = dDelta ; } //< > else return ( EMPTY ) ; //< > // //< > if ( dLoss > dATR * dFactorSL ) iResult = TRUE ; //< > if ( dProfit > dATR * dFactorTP ) iResult = TRUE ; //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.2. Code : Interface : iSignalClose > //< > ////////////////////////////////////////////////////////////////////< 8> // < 2.1.3. Code : Interface : iGetTrade > //< > // //< > int iGetTrade () // - i 11 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > for ( int i = OrdersTotal () - 1 ; i >= 0 ; i -- ) //< > { //< > if ( OrderSelect ( i , SELECT_BY_POS ) == TRUE ) //< > if ( OrderMagicNumber () == iMagic ) //< > { //< > iResult = OrderTicket () ; //< > break ; //< > } // if //< > } // for //< > // //< > // //< > // //< > // //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.3. Code : Interface : iGetTrade > //< > AIRAT SAFIN 2010.03.12 23:31 #18 ////////////////////////////////////////////////////////////////////< 9> // < 2.1.4. Code : Interface : iTryOpen > //< > // //< > int iTryOpen () // - i 14 l - o //< > { //< > int iCommand = iSignalOpen () ; //< > if ( iCommand == EMPTY ) return ; //< > // //< > if ( iCommand == OP_BUY ) //< > { int iColor = Blue ; int iMode = MODE_ASK ; //< > string sType = "Buy" ; } //< > else { iColor = Red ; iMode = MODE_BID ; //< > sType = "Sell" ; } //< > double dPrice = MarketInfo ( Symbol () , iMode ) ; //< > // //< > OrderSend ( Symbol () , iCommand , dLots , dPrice , //< > iSlippage , 0 , 0 , "" , iMagic , 0 , iColor ) ; //< > // //< > iTrap = GetLastError () ; //< > if ( iTrap == 0 ) //< > Alert ( sType , " Was a Big Success" ) ; //< > else Alert ( sType , " open exception " , iTrap ) ; //< > } //< > // </2.1.4. Code : Interface : iTryOpen > //< > ////////////////////////////////////////////////////////////////////< 10> // < 2.1.5. Code : Interface : iTryClose > //< > // //< > int iTryClose () // - i 14 l - o //< > { //< > int iCommand = iSignalClose () ; //< > if ( iCommand == EMPTY ) return ; //< > // //< > if ( OrderType () == OP_BUY ) //< > { int iColor = Red ; //< > string sType = "Buy" ; } //< > else { iColor = Blue ; //< > sType = "Sell" ; } //< > if ( OrderProfit () > 0 ) string sV = "Take" ; else sV = "Stop" ; //< > // //< > OrderClose ( OrderTicket () , OrderLots () , OrderClosePrice () , //< > iSlippage , iColor ) ; //< > // //< > iTrap = GetLastError () ; //< > if ( iTrap == 0 ) //< > Alert ( sType , " closed with Hard " , sV ) ; //< > else Alert ( sType , " close exception " , iTrap ) ; //< > } //< > // </2.1.5. Code : Interface : iTryClose > //< > AIRAT SAFIN 2010.03.12 23:31 #19 ////////////////////////////////////////////////////////////////////< 11> // < 2.2. Code : Special > //< > // //< > // < 2.2. Special 3 / - i 7 l - o > //< > // < 1. init - i 1 l - o /> //< > // < 2. deinit - i 1 l - o /> //< > // < 3. start - i 5 l - o /> //< > // </2.2. Special 3 / - i 7 l - o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </2.2. Code : Special > //< > ////////////////////////////////////////////////////////////////////< 12> // < 2.2.1. Code : Special : Init > //< > // //< > int init () // - i 1 l - o //< > { //< > Alert ( "" , "Start " , UninitializeReason () ) ; //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > } //< > // </2.2.1. Code : Special : Init > //< > AIRAT SAFIN 2010.03.12 23:31 #20 ////////////////////////////////////////////////////////////////////< 13> // < 2.2.2. Code : Special : Deinit > //< > // //< > int deinit () // - i 1 l - o //< > { //< > Alert ( "" , "Stop " , UninitializeReason () ) ; //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > } //< > // </2.2.2. Code : Special : Deinit > //< > ////////////////////////////////////////////////////////////////////< 14> // < 2.2.3. Code : Special : Start > //< > // //< > int start () // - i 5 l - o //< > { //< > // < 2.2.3.1. Main routine 3 >````````````````````````````````````//< > int iTicket = iGetTrade () ; //< > // //< > if ( iTicket < 0 ) iTryOpen () ; //< > else iTryClose () ; //< > // </2.2.3.1. Main routine 3 >````````````````````````````````````//< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // < 2.2.3.2. Exception handler 2 >```````````````````````````````//< > iTrap = GetLastError () ; //< > if ( iTrap > 0 ) Alert ( "Exception " , iTrap ) ; //< > // </2.2.3.2. Exception handler 2 >```````````````````````````````//< > } //< > // </2.2.3. Code : Special : Start > //< > ////////////////////////////////////////////////////////////////////< 0> Adjust MetaEditor window to see 25 lines x 80 columns. Use <Page Up> and <Page Down> to scroll the content. State: Ready for optimization Last edit: 2010.03.15 11:48 Works fine on "EURUSD" D1 with original settings 附加的文件: 1_18.mq4 27 kb 123456789 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
如果(1.4321-1.4361-(20*2)<=0),对不起,我不明白。
OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。
你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。 这发生在Bid-SL<=0时
当Bid-SL>0时,这就是初始条件。
SL=1.4361-(20*2)为止损值
OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。
你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。这发生在Bid-SL<=0时
当Bid-SL>0时,这就是初始条件。
谢谢你的回复。对表达方式感到困惑。 在我的隧道视野中,我专注于卖出方,表达式中的'='号位于表达式的左边。我将努力解决这个问题并回来。谢谢你。你所分享的时间和努力是非常慷慨的。
谢谢
SL=1.4361-(20*2)为止损值
OrderClosePrice()或Bid(买入)或Ask(卖出)是当前市场价值。
你想在当前市场(1.4321)处于或低于(买入)SL的时候关闭。这发生在Bid-SL<=0时
当Bid-SL>0时,这就是初始条件。
Hi WHRoeder
只是为了帮助你了解最新情况。我编辑了之前的回复。
我也把表达式插入了程序中。同样的想法有许多种解释方式。
谢谢你指出了最新的一种。但看,这个表达式并没有改变结果。
就好像,程序从来没有看过这个条件。也许它不看 "for "语句以外的内容。
我正在重新审视我的代码。
谢谢你所做的一切。
////////////////////////////////////////////////////////////////////< 1> // < Property > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </Property > //< >
////////////////////////////////////////////////////////////////////< 2> // < Content > //< > // //< > // < Structure 16 elements in 4 domains > //< > // < 1. Data 8 elements in 2 domains /> //< > // < 2. Code 8 elements in 2 domains /> //< > // </Structure 16 elements in 4 domains > //< > // //< > // < 1. Data 8 = 5 i 3 d - s > //< > // < 1.1. Input 7 = 4 i 3 d - s /> //< > // < 1.2. Buffer 1 = 1 i - d - s /> //< > // </1. Data 8 = 5 i 3 d - s > //< > // //< > // < 2. Code 8 / i 70 l 3 o > //< > // < 2.1. Interface 5 / - i 63 l 3 o /> //< > // < 2.2. Special 3 / - i 7 l - o /> //< > // </2. Code 8 / i 70 l 3 o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // </Content > //< >
////////////////////////////////////////////////////////////////////< 3> // < 1.1. Data : Input > //< > // //< > // < 1.1. Input 7 = 4 i 3 d - s > //< > // < 1. Strategy 4 = 2 i 2 d - s /> //< > // < 2. Trading 3 = 2 i 1 d - s /> //< > // </1.1. Input 7 = 4 i 3 d - s > //< > // //< > // < 1. Strategy 4 >=========================================//< > int iBasePeriod = 20 ; //< > int iBaseBar = 1 ; //< > double dFactorTP = 2.0 ; //< > double dFactorSL = 2.0 ; //< > // </ 1. Strategy 4 >=========================================//< > // //< > // < 2. Trading 3 >==========================================//< > int iSlippage = 1 ; //< > int iMagic = 1 ; //< > double dLots = 0.1 ; //< > // </ 2. Trading 3 >==========================================//< > // //< > // //< > // //< > // </1.1. Data : Input > //< >
////////////////////////////////////////////////////////////////////< 4> // < 1.2. Data : Buffer > //< > // //< > // < 1.2. Buffer 1 = 1 i - d - s > //< > // < 1. Exception 1 = 1 i - d - s /> //< > // </1.2. Buffer 1 = 1 i - d - s > //< > // //< > // < 1. Exception 1 >========================================//< > int iTrap ; //< > // </ 1. Exception 1 >========================================//< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </1.2. Data : Buffer > //< >
////////////////////////////////////////////////////////////////////< 5> // < 2.1. Code : Interface > //< > // //< > // < 2.1. Interface 5 / - i 63 l 3 o > //< > // < 1. iSignalOpen - i 12 l 1 o /> //< > // < 2. iSignalClose - i 12 l 1 o /> //< > // < 3. iGetTrade - i 11 l 1 o /> //< > // < 4. iTryOpen - i 14 l - o /> //< > // < 5. iTryClose - i 14 l - o /> //< > // </2.1. Interface 5 / - i 63 l 3 o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </2.1. Code : Interface > //< >
////////////////////////////////////////////////////////////////////< 6> // < 2.1.1. Code : Interface : iSignalOpen > //< > // //< > int iSignalOpen () // - i 12 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > int iIndexH = iHighest ( 0 , 0 , MODE_HIGH , iBasePeriod , //< > iBaseBar ) ; //< > int iIndexL = iLowest ( 0 , 0 , MODE_LOW , iBasePeriod , //< > iBaseBar ) ; //< > // //< > double dHigh = High [ iIndexH ] ; //< > double dLow = Low [ iIndexL ] ; //< > // //< > double dAsk = MarketInfo ( Symbol () , MODE_ASK ) ; //< > double dBid = MarketInfo ( Symbol () , MODE_BID ) ; //< > // //< > if ( dAsk > dHigh ) iResult = OP_BUY ; //< > if ( dBid < dLow ) iResult = OP_SELL ; //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.1. Code : Interface : iSignalOpen > //< >
////////////////////////////////////////////////////////////////////< 7> // < 2.1.2. Code : Interface : iSignalClose > //< > // //< > int iSignalClose () // - i 12 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > double dATR , dDelta , dLoss , dProfit ; //< > // //< > dATR = iATR ( 0 , 0 , iBasePeriod , iBaseBar ) ; //< > dDelta = OrderClosePrice () - OrderOpenPrice () ; //< > // //< > if ( OrderType () == OP_BUY ) //< > { dProfit = dDelta ; dLoss = -dDelta ; } //< > else if ( OrderType () == OP_SELL ) //< > { dProfit = -dDelta ; dLoss = dDelta ; } //< > else return ( EMPTY ) ; //< > // //< > if ( dLoss > dATR * dFactorSL ) iResult = TRUE ; //< > if ( dProfit > dATR * dFactorTP ) iResult = TRUE ; //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.2. Code : Interface : iSignalClose > //< >
////////////////////////////////////////////////////////////////////< 8> // < 2.1.3. Code : Interface : iGetTrade > //< > // //< > int iGetTrade () // - i 11 l 1 o //< > { //< > int iResult = EMPTY ; //< > // //< > for ( int i = OrdersTotal () - 1 ; i >= 0 ; i -- ) //< > { //< > if ( OrderSelect ( i , SELECT_BY_POS ) == TRUE ) //< > if ( OrderMagicNumber () == iMagic ) //< > { //< > iResult = OrderTicket () ; //< > break ; //< > } // if //< > } // for //< > // //< > // //< > // //< > // //< > // //< > return ( iResult ) ; //< > } //< > // </2.1.3. Code : Interface : iGetTrade > //< >
////////////////////////////////////////////////////////////////////< 9> // < 2.1.4. Code : Interface : iTryOpen > //< > // //< > int iTryOpen () // - i 14 l - o //< > { //< > int iCommand = iSignalOpen () ; //< > if ( iCommand == EMPTY ) return ; //< > // //< > if ( iCommand == OP_BUY ) //< > { int iColor = Blue ; int iMode = MODE_ASK ; //< > string sType = "Buy" ; } //< > else { iColor = Red ; iMode = MODE_BID ; //< > sType = "Sell" ; } //< > double dPrice = MarketInfo ( Symbol () , iMode ) ; //< > // //< > OrderSend ( Symbol () , iCommand , dLots , dPrice , //< > iSlippage , 0 , 0 , "" , iMagic , 0 , iColor ) ; //< > // //< > iTrap = GetLastError () ; //< > if ( iTrap == 0 ) //< > Alert ( sType , " Was a Big Success" ) ; //< > else Alert ( sType , " open exception " , iTrap ) ; //< > } //< > // </2.1.4. Code : Interface : iTryOpen > //< >
////////////////////////////////////////////////////////////////////< 10> // < 2.1.5. Code : Interface : iTryClose > //< > // //< > int iTryClose () // - i 14 l - o //< > { //< > int iCommand = iSignalClose () ; //< > if ( iCommand == EMPTY ) return ; //< > // //< > if ( OrderType () == OP_BUY ) //< > { int iColor = Red ; //< > string sType = "Buy" ; } //< > else { iColor = Blue ; //< > sType = "Sell" ; } //< > if ( OrderProfit () > 0 ) string sV = "Take" ; else sV = "Stop" ; //< > // //< > OrderClose ( OrderTicket () , OrderLots () , OrderClosePrice () , //< > iSlippage , iColor ) ; //< > // //< > iTrap = GetLastError () ; //< > if ( iTrap == 0 ) //< > Alert ( sType , " closed with Hard " , sV ) ; //< > else Alert ( sType , " close exception " , iTrap ) ; //< > } //< > // </2.1.5. Code : Interface : iTryClose > //< >
////////////////////////////////////////////////////////////////////< 11> // < 2.2. Code : Special > //< > // //< > // < 2.2. Special 3 / - i 7 l - o > //< > // < 1. init - i 1 l - o /> //< > // < 2. deinit - i 1 l - o /> //< > // < 3. start - i 5 l - o /> //< > // </2.2. Special 3 / - i 7 l - o > //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // </2.2. Code : Special > //< >
////////////////////////////////////////////////////////////////////< 12> // < 2.2.1. Code : Special : Init > //< > // //< > int init () // - i 1 l - o //< > { //< > Alert ( "" , "Start " , UninitializeReason () ) ; //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > } //< > // </2.2.1. Code : Special : Init > //< >
////////////////////////////////////////////////////////////////////< 13> // < 2.2.2. Code : Special : Deinit > //< > // //< > int deinit () // - i 1 l - o //< > { //< > Alert ( "" , "Stop " , UninitializeReason () ) ; //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > } //< > // </2.2.2. Code : Special : Deinit > //< >
////////////////////////////////////////////////////////////////////< 14> // < 2.2.3. Code : Special : Start > //< > // //< > int start () // - i 5 l - o //< > { //< > // < 2.2.3.1. Main routine 3 >````````````````````````````````````//< > int iTicket = iGetTrade () ; //< > // //< > if ( iTicket < 0 ) iTryOpen () ; //< > else iTryClose () ; //< > // </2.2.3.1. Main routine 3 >````````````````````````````````````//< > // //< > // //< > // //< > // //< > // //< > // //< > // //< > // < 2.2.3.2. Exception handler 2 >```````````````````````````````//< > iTrap = GetLastError () ; //< > if ( iTrap > 0 ) Alert ( "Exception " , iTrap ) ; //< > // </2.2.3.2. Exception handler 2 >```````````````````````````````//< > } //< > // </2.2.3. Code : Special : Start > //< > ////////////////////////////////////////////////////////////////////< 0>
Adjust MetaEditor window to see 25 lines x 80 columns. Use <Page Up> and <Page Down> to scroll the content. State: Ready for optimization Last edit: 2010.03.15 11:48 Works fine on "EURUSD" D1 with original settings