да чуть не забыл,если что пишите на мыло dmitry-dobrynin@rambler.ru
//+------------------------------------------------------------------+ //| RSI-AREA.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| https://www.metaquotes.net// | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "https://www.metaquotes.net//" extern int RSIPeriod=13; extern int AreaCondition=300; int start() { static int RSIAreaShift=0; int cnt, shift; double RSIOpen, RSIArea, RSICurrent, RSILocalMin, RSILocalMax, value; if(OrdersTotal()<1) { RSIArea = RSIAreaFunc(RSIAreaShift, RSIPeriod, 0); if(RSIArea<-AreaCondition) { OrderSend(Symbol(),OP_BUY,1.0,Ask,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); } if(RSIArea>AreaCondition) { OrderSend(Symbol(),OP_SELL,1.0,Bid,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); } RSIAreaShift=0; return(0); } // ================================================================= RSICurrent = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); if(RSIOpen>50 && RSICurrent>50) return(0); if(RSIOpen<50 && RSICurrent<50) return(0); RSILocalMin = RSICurrent; RSILocalMax = RSICurrent; for(shift=1; shift<RSIAreaShift; shift++) { value = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, shift); if(value<RSILocalMin && RSIArea>0) RSILocalMin=value; if(value>RSILocalMax && RSIArea<0) RSILocalMax=value; for(cnt=OrdersTotal()-1; cnt>=0; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol()) { if(OrderType()==OP_BUY) { if(RSILocalMax >= (RSICurrent+4) && RSILocalMax>50) { OrderClose(OrderTicket(),OrderLots(),Bid,3); } } if(OrderType()==OP_SELL) { if(RSILocalMin <= (RSICurrent-4) && RSILocalMin<50) { OrderClose(OrderTicket(),OrderLots(),Ask,3); } } } } } return(0); } //======================================================================= double RSIAreaFunc(int RSIAreaShift, double RSIPeriod, int BeginShift) { int shift; double rsivalue, result; result = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, BeginShift) - 50.0; for(shift=BeginShift+1; shift<Bars-RSIPeriod; shift++) { rsivalue = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, shift) - 50.0; if((result>0 && rsivalue<-3) || (result<0 && rsivalue>3)) { RSIAreaShift=shift; break; } result += rsivalue; } return(result); }Ошибки исправил, те что нашел, но сделки почему-то не закрываются:(
В тексте книги в этом месте ошибки набора. Вот оригинал эксперта
//+------------------------------------------------------------------+ //| RSI_Area.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| https://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, MetaQuotes Software Corp." #property link "https://www.metaquotes.net/" extern int RSIPeriod=13; extern int AreaCondition=300; double RSIArea, RSIOpen; //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { static int RSIAreaShift=0; int cnt, shift; double RSICurrent, RSILocalMin, RSILocalMax, value; //---- if(OrdersTotal()<1) { RSIArea = RSIAreaFunc(RSIAreaShift, RSIPeriod, 0); //---- проверяем на возможность встать в длинную позицию if(RSIArea<-AreaCondition) { OrderSend(Symbol(),OP_BUY,1.0,Ask,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); return(0); } //---- проверяем на возможность встать в короткую позицию if(RSIArea>AreaCondition) { OrderSend(Symbol(),OP_SELL,1.0,Bid,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); return(0); } RSIAreaShift=0; } RSICurrent = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); if(RSIOpen>50 && RSICurrent>50) return(0); if(RSIOpen<50 && RSICurrent<50) return(0); RSILocalMin = RSICurrent; RSILocalMax = RSICurrent; for(shift=1; shift<RSIAreaShift; shift++) { value = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, shift); if(value<RSILocalMin && RSIArea>0) RSILocalMin=value; if(value>RSILocalMax && RSIArea<0) RSILocalMax=value; } for(cnt=OrdersTotal()-1; cnt>=0; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol()) { if(OrderType()==OP_BUY) { //---- проверим, может уже пора закрываться? if(RSILocalMax>=RSICurrent+4 && RSILocalMax>50) OrderClose(OrderTicket(),OrderLots(),Bid,3); } if(OrderType()==OP_SELL) { if(RSILocalMin<=RSICurrent-4 && RSILocalMin<50) OrderClose(OrderTicket(),OrderLots(),Ask,3); } } } //---- return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ double RSIAreaFunc(int& RSIAreaShift, double RsiPeriod, int BeginShift) { int shift; double rsivalue, result; result = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, BeginShift) - 50.0; for(shift=BeginShift+1; shift<Bars-RsiPeriod; shift++) { rsivalue = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, shift) - 50.0; if((result>0 && rsivalue<-3) || (result<0 && rsivalue>3)) { RSIAreaShift=shift; break; } result += rsivalue; } return(result); } //+------------------------------------------------------------------+
А вот оригинал индикатора
//+------------------------------------------------------------------+ //| RSIAreaIndicator.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| https://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, MetaQuotes Software Corp." #property link "https://www.metaquotes.net/" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Gray #property indicator_color2 Gray //---- input parameters extern int ExtRSIPeriod=13; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorShortName("RSIArea("+ExtRSIPeriod+")"); //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,ExtMapBuffer2); SetIndexLabel(1,NULL); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; //---- macd counted in the 1-st additional buffer for(int i=0; i<limit; i++) { double value=iRSI(NULL,0,ExtRSIPeriod,PRICE_CLOSE,i)-50.0; ExtMapBuffer1[i]=value; ExtMapBuffer2[i]=value; } //---- return(0); } //+------------------------------------------------------------------+
ну вот:) а я исправлял, старался:)
Вот исправленный, работает:
//+------------------------------------------------------------------+ //| RSI-AREA.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| https://www.metaquotes.net// | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "https://www.metaquotes.net//" extern int RSIPeriod=13; extern int AreaCondition=300; double RSIArea,RSIOpen; int init() {return(0);} int deinit() {return(0);} double RSIAreaFunc(int& RSIAreaShift, double RSIPeriod, int BeginShift) { int shift; double rsivalue, result; result = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, BeginShift) - 50.0; for(shift=BeginShift+1; shift<Bars-RSIAreaShift; shift++) { rsivalue = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, shift) - 50.0; if((result>0 && rsivalue<-3) || (result<0 && rsivalue>3)) { RSIAreaShift=shift; break; } result += rsivalue; } return(result); } // int start() { static int RSIAreaShift=0; int cnt, shift; double RSICurrent, RSILocalMin, RSILocalMax, value; //-- if(OrdersTotal()<1) { RSIArea = RSIAreaFunc(RSIAreaShift, RSIPeriod, 0); if(RSIArea<-AreaCondition) { OrderSend(Symbol(),OP_BUY,1.0,Ask,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); } if(RSIArea>AreaCondition) { OrderSend(Symbol(),OP_SELL,1.0,Bid,3,0.0,0.0); RSIOpen = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); return(0); } // } RSICurrent = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, 0); if(RSIOpen>50 && RSICurrent>50) return(0); if(RSIOpen<50 && RSICurrent<50) return(0); RSILocalMin = RSICurrent; RSILocalMax = RSICurrent; for(shift=1; shift<RSIAreaShift; shift++) { value = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, shift); if(value<RSILocalMin && RSIArea>0) RSILocalMin=value; if(value>RSILocalMax && RSIArea<0) RSILocalMax=value; for(cnt=OrdersTotal()-1; cnt>=0; cnt--) { OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol()) { if(OrderType()==OP_BUY) { if(RSILocalMax>=RSICurrent+4 && RSILocalMax>50)OrderClose(OrderTicket(),OrderLots(),Bid,3); } if(OrderType()==OP_SELL) { if(RSILocalMin<=RSICurrent-4 && RSILocalMin<50)OrderClose(OrderTicket(),OrderLots(),Ask,3); } } } } return(0); }
Ещё один? :о
Даже не очень-то и сливает))))))
Strategy Tester: RSI-Area
Strategy Tester: RSI-Area
Strategy Tester Report
RSI-Area
Символ | EURUSD (Euro vs US Dollar) | ||||
Период | 1 Час (H1) 2007.01.02 08:00 - 2007.06.21 00:00 (2007.01.01 - 2007.06.21) | ||||
Модель | Все тики (на основе всех наименьших доступных периодов с фрактальной интерполяцией каждого тика) | ||||
Параметры | RSIPeriod=13; AreaCondition=300; | ||||
Баров в истории | 7917 | Смоделировано тиков | 423406 | Качество моделирования | 90.00% |
Начальный депозит | 10000.00 | ||||
Чистая прибыль | 2459.80 | Общая прибыль | 7409.60 | Общий убыток | -4949.80 |
Прибыльность | 1.50 | Матожидание выигрыша | 61.50 | ||
Абсолютная просадка | 1867.60 | Максимальная просадка | 2089.80 (20.44%) | Относительная просадка | 20.44% (2089.80) |
Всего сделок | 40 | Короткие позиции (% выигравших) | 22 (68.18%) | Длинные позиции (% выигравших) | 18 (77.78%) |
Прибыльные сделки (% от всех) | 29 (72.50%) | Убыточные сделки (% от всех) | 11 (27.50%) | ||
Самая большая | прибыльная сделка | 652.20 | убыточная сделка | -1314.70 | |
Средняя | прибыльная сделка | 255.50 | убыточная сделка | -449.98 | |
Максимальное количество | непрерывных выигрышей (прибыль) | 9 (1796.10) | непрерывных проигрышей (убыток) | 4 (-1115.40) | |
Максимальная | непрерывная прибыль (число выигрышей) | 1872.10 (7) | непрерывный убыток (число проигрышей) | -1314.70 (1) | |
Средний | непрерывный выигрыш | 4 | непрерывный проигрыш | 1 |
№ | Время | Тип | Ордер | Лоты | Цена | S / L | T / P | Прибыль | Баланс |
1 | 2007.01.02 08:00 | sell | 1 | 1.00 | 1.3241 | 0.0000 | 0.0000 | ||
2 | 2007.01.03 13:17 | close | 1 | 1.00 | 1.3232 | 0.0000 | 0.0000 | 92.20 | 10092.20 |
3 | 2007.01.04 01:00 | buy | 2 | 1.00 | 1.3167 | 0.0000 | 0.0000 | ||
4 | 2007.01.09 03:48 | close | 2 | 1.00 | 1.3037 | 0.0000 | 0.0000 | -1314.70 | 8777.50 |
5 | 2007.01.10 17:00 | buy | 3 | 1.00 | 1.2963 | 0.0000 | 0.0000 | ||
6 | 2007.01.11 15:34 | close | 3 | 1.00 | 1.2977 | 0.0000 | 0.0000 | 125.30 | 8902.80 |
7 | 2007.01.12 15:00 | buy | 4 | 1.00 | 1.2890 | 0.0000 | 0.0000 | ||
8 | 2007.01.12 17:05 | close | 4 | 1.00 | 1.2921 | 0.0000 | 0.0000 | 310.00 | 9212.80 |
9 | 2007.01.23 23:00 | sell | 5 | 1.00 | 1.3026 | 0.0000 | 0.0000 | ||
10 | 2007.01.24 11:04 | close | 5 | 1.00 | 1.2987 | 0.0000 | 0.0000 | 392.20 | 9605.00 |
11 | 2007.01.26 16:42 | buy | 6 | 1.00 | 1.2899 | 0.0000 | 0.0000 | ||
12 | 2007.01.29 10:20 | close | 6 | 1.00 | 1.2914 | 0.0000 | 0.0000 | 145.10 | 9750.10 |
13 | 2007.01.30 09:00 | sell | 7 | 1.00 | 1.2961 | 0.0000 | 0.0000 | ||
14 | 2007.01.31 12:07 | close | 7 | 1.00 | 1.2937 | 0.0000 | 0.0000 | 242.20 | 9992.30 |
15 | 2007.02.01 07:00 | sell | 8 | 1.00 | 1.3032 | 0.0000 | 0.0000 | ||
16 | 2007.02.02 19:08 | close | 8 | 1.00 | 1.2967 | 0.0000 | 0.0000 | 652.20 | 10644.50 |
17 | 2007.02.05 08:00 | buy | 9 | 1.00 | 1.2936 | 0.0000 | 0.0000 | ||
18 | 2007.02.06 13:00 | close | 9 | 1.00 | 1.2937 | 0.0000 | 0.0000 | 5.10 | 10649.60 |
19 | 2007.02.07 03:24 | sell | 10 | 1.00 | 1.2975 | 0.0000 | 0.0000 | ||
20 | 2007.02.08 12:11 | close | 10 | 1.00 | 1.2992 | 0.0000 | 0.0000 | -163.40 | 10486.20 |
21 | 2007.02.13 03:00 | buy | 11 | 1.00 | 1.2958 | 0.0000 | 0.0000 | ||
22 | 2007.02.13 10:18 | close | 11 | 1.00 | 1.2993 | 0.0000 | 0.0000 | 350.00 | 10836.20 |
23 | 2007.02.14 01:00 | sell | 12 | 1.00 | 1.3034 | 0.0000 | 0.0000 | ||
24 | 2007.02.16 11:18 | close | 12 | 1.00 | 1.3128 | 0.0000 | 0.0000 | -931.20 | 9905.00 |
25 | 2007.02.26 08:00 | sell | 13 | 1.00 | 1.3181 | 0.0000 | 0.0000 | ||
26 | 2007.02.26 19:45 | close | 13 | 1.00 | 1.3165 | 0.0000 | 0.0000 | 160.00 | 10065.00 |
27 | 2007.03.02 15:00 | buy | 14 | 1.00 | 1.3162 | 0.0000 | 0.0000 | ||
28 | 2007.03.02 21:47 | close | 14 | 1.00 | 1.3190 | 0.0000 | 0.0000 | 280.00 | 10345.00 |
29 | 2007.03.05 23:00 | buy | 15 | 1.00 | 1.3094 | 0.0000 | 0.0000 | ||
30 | 2007.03.06 11:09 | close | 15 | 1.00 | 1.3114 | 0.0000 | 0.0000 | 195.10 | 10540.10 |
31 | 2007.03.08 05:00 | sell | 16 | 1.00 | 1.3176 | 0.0000 | 0.0000 | ||
32 | 2007.03.08 12:38 | close | 16 | 1.00 | 1.3157 | 0.0000 | 0.0000 | 190.00 | 10730.10 |
33 | 2007.03.13 02:00 | sell | 17 | 1.00 | 1.3186 | 0.0000 | 0.0000 | ||
34 | 2007.03.13 10:02 | close | 17 | 1.00 | 1.3172 | 0.0000 | 0.0000 | 140.00 | 10870.10 |
35 | 2007.03.14 23:00 | sell | 18 | 1.00 | 1.3223 | 0.0000 | 0.0000 | ||
36 | 2007.03.15 11:35 | close | 18 | 1.00 | 1.3212 | 0.0000 | 0.0000 | 116.60 | 10986.70 |
37 | 2007.03.16 08:00 | sell | 19 | 1.00 | 1.3289 | 0.0000 | 0.0000 | ||
38 | 2007.03.19 09:56 | close | 19 | 1.00 | 1.3301 | 0.0000 | 0.0000 | -117.80 | 10868.90 |
39 | 2007.03.22 06:00 | sell | 20 | 1.00 | 1.3388 | 0.0000 | 0.0000 | ||
40 | 2007.03.22 19:01 | close | 20 | 1.00 | 1.3337 | 0.0000 | 0.0000 | 510.00 | 11378.90 |
41 | 2007.03.23 20:00 | buy | 21 | 1.00 | 1.3291 | 0.0000 | 0.0000 | ||
42 | 2007.03.26 18:38 | close | 21 | 1.00 | 1.3325 | 0.0000 | 0.0000 | 335.10 | 11714.00 |
43 | 2007.03.27 10:00 | sell | 22 | 1.00 | 1.3330 | 0.0000 | 0.0000 | ||
44 | 2007.03.28 12:41 | close | 22 | 1.00 | 1.3339 | 0.0000 | 0.0000 | -87.80 | 11626.20 |
45 | 2007.04.05 18:00 | sell | 23 | 1.00 | 1.3433 | 0.0000 | 0.0000 | ||
46 | 2007.04.06 17:44 | close | 23 | 1.00 | 1.3377 | 0.0000 | 0.0000 | 562.20 | 12188.40 |
47 | 2007.04.09 04:00 | buy | 24 | 1.00 | 1.3363 | 0.0000 | 0.0000 | ||
48 | 2007.04.10 06:39 | close | 24 | 1.00 | 1.3417 | 0.0000 | 0.0000 | 535.10 | 12723.50 |
49 | 2007.04.10 20:00 | sell | 25 | 1.00 | 1.3434 | 0.0000 | 0.0000 | ||
50 | 2007.04.17 03:10 | close | 25 | 1.00 | 1.3531 | 0.0000 | 0.0000 | -954.60 | 11768.90 |
51 | 2007.04.18 11:31 | sell | 26 | 1.00 | 1.3596 | 0.0000 | 0.0000 | ||
52 | 2007.04.18 19:09 | close | 26 | 1.00 | 1.3581 | 0.0000 | 0.0000 | 150.00 | 11918.90 |
53 | 2007.04.25 03:00 | sell | 27 | 1.00 | 1.3632 | 0.0000 | 0.0000 | ||
54 | 2007.04.26 13:17 | close | 27 | 1.00 | 1.3615 | 0.0000 | 0.0000 | 176.60 | 12095.50 |
55 | 2007.05.02 15:00 | buy | 28 | 1.00 | 1.3575 | 0.0000 | 0.0000 | ||
56 | 2007.05.02 21:28 | close | 28 | 1.00 | 1.3596 | 0.0000 | 0.0000 | 210.00 | 12305.50 |
57 | 2007.05.04 06:00 | buy | 29 | 1.00 | 1.3545 | 0.0000 | 0.0000 | ||
58 | 2007.05.04 16:02 | close | 29 | 1.00 | 1.3584 | 0.0000 | 0.0000 | 390.00 | 12695.50 |
59 | 2007.05.07 16:00 | sell | 30 | 1.00 | 1.3618 | 0.0000 | 0.0000 | ||
60 | 2007.05.08 01:38 | close | 30 | 1.00 | 1.3603 | 0.0000 | 0.0000 | 152.20 | 12847.70 |
61 | 2007.05.08 23:00 | buy | 31 | 1.00 | 1.3544 | 0.0000 | 0.0000 | ||
62 | 2007.05.09 17:35 | close | 31 | 1.00 | 1.3548 | 0.0000 | 0.0000 | 35.10 | 12882.80 |
63 | 2007.05.11 08:00 | buy | 32 | 1.00 | 1.3480 | 0.0000 | 0.0000 | ||
64 | 2007.05.11 18:02 | close | 32 | 1.00 | 1.3515 | 0.0000 | 0.0000 | 350.00 | 13232.80 |
65 | 2007.05.14 09:00 | sell | 33 | 1.00 | 1.3543 | 0.0000 | 0.0000 | ||
66 | 2007.05.15 14:07 | close | 33 | 1.00 | 1.3535 | 0.0000 | 0.0000 | 82.20 | 13315.00 |
67 | 2007.05.16 10:00 | sell | 34 | 1.00 | 1.3606 | 0.0000 | 0.0000 | ||
68 | 2007.05.16 17:02 | close | 34 | 1.00 | 1.3581 | 0.0000 | 0.0000 | 250.00 | 13565.00 |
69 | 2007.05.17 06:00 | buy | 35 | 1.00 | 1.3528 | 0.0000 | 0.0000 | ||
70 | 2007.05.18 19:07 | close | 35 | 1.00 | 1.3502 | 0.0000 | 0.0000 | -264.90 | 13300.10 |
71 | 2007.05.22 05:00 | buy | 36 | 1.00 | 1.3456 | 0.0000 | 0.0000 | ||
72 | 2007.05.23 16:20 | close | 36 | 1.00 | 1.3484 | 0.0000 | 0.0000 | 275.10 | 13575.20 |
73 | 2007.06.05 01:00 | sell | 37 | 1.00 | 1.3494 | 0.0000 | 0.0000 | ||
74 | 2007.06.06 15:03 | close | 37 | 1.00 | 1.3518 | 0.0000 | 0.0000 | -237.80 | 13337.40 |
75 | 2007.06.08 00:24 | buy | 38 | 1.00 | 1.3430 | 0.0000 | 0.0000 | ||
76 | 2007.06.12 07:26 | close | 38 | 1.00 | 1.3359 | 0.0000 | 0.0000 | -719.80 | 12617.60 |
77 | 2007.06.13 03:00 | buy | 39 | 1.00 | 1.3302 | 0.0000 | 0.0000 | ||
78 | 2007.06.13 22:10 | close | 39 | 1.00 | 1.3301 | 0.0000 | 0.0000 | -10.00 | 12607.60 |
79 | 2007.06.18 02:00 | sell | 40 | 1.00 | 1.3380 | 0.0000 | 0.0000 | ||
80 | 2007.06.19 13:10 | close | 40 | 1.00 | 1.3395 | 0.0000 | 0.0000 | -147.80 | 12459.80 |
stringo:
В тексте книги в этом месте ошибки набора. Вот оригинал эксперта
double RSIAreaFunc(int& RSIAreaShift, double RsiPeriod, int BeginShift) { int shift; double rsivalue, result; result = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, BeginShift) - 50.0;for(shift=BeginShift+1; shift<Bars-RsiPeriod; shift++)
{
rsivalue = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, shift) - 50.0;
if((result>0 && rsivalue<-3) || (result<0 && rsivalue>3))
{
RSIAreaShift=shift;
break;
}
result += rsivalue;
}
return(result);
}
//+------------------------------------------------------------------+
В Вашем оригинале явная ошибка. Нужно так:for(shift=BeginShift+1; shift<Bars-RSIAreaShift; shift++)
Sepulca:
В Вашем оригинале явная ошибка. Нужно так:for(shift=BeginShift+1; shift<Bars-RSIAreaShift; shift++)
stringo:
В тексте книги в этом месте ошибки набора. Вот оригинал эксперта
double RSIAreaFunc(int& RSIAreaShift, double RsiPeriod, int BeginShift) { int shift; double rsivalue, result; result = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, BeginShift) - 50.0;for(shift=BeginShift+1; shift<Bars-RsiPeriod; shift++)
{
rsivalue = iRSI(NULL, 0, RsiPeriod, PRICE_CLOSE, shift) - 50.0;
if((result>0 && rsivalue<-3) || (result<0 && rsivalue>3))
{
RSIAreaShift=shift;
break;
}
result += rsivalue;
}
return(result);
}
//+------------------------------------------------------------------+
В Вашем оригинале явная ошибка. Нужно так:for(shift=BeginShift+1; shift<Bars-RSIAreaShift; shift++)
пожалуйста объясните как правильно тестить у меня в тестере
никаких графиков изменения баланса нет вообще ничего нет!

Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь