Author: FORTRADER.RU
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reachedIt Closes Orders by itself It can change open orders parameters, due to possible stepping strategy
Indicators Used
Bollinger bands indicatorRelative strength index
0 Views
0 Downloads
0 Favorites

Profitability Reports

AUD/USD Oct 2024 - Jan 2025
111.00 %
Total Trades 17
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff 7.29
Gross Profit 1291.00
Gross Loss -1167.00
Total Net Profit 124.00
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
52.00 %
Total Trades 27
Won Trades 14
Lost trades 13
Win Rate 0.52 %
Expected payoff -65.31
Gross Profit 1878.00
Gross Loss -3641.50
Total Net Profit -1763.50
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
5.00 %
Total Trades 13
Won Trades 2
Lost trades 11
Win Rate 0.15 %
Expected payoff -160.92
Gross Profit 108.00
Gross Loss -2200.00
Total Net Profit -2092.00
-100%
-50%
0%
50%
100%
FullDamp
#property copyright "FORTRADER.RU"
#property link      "http://FORTRADER.RU"

/*

Ïîäðîáíîå îïèñàíèå ïàðàìåòðîâ ñîâåòíèêà äîñòóïíî â íîìåðå æóðíàëà îò 2 Èþíÿ, 
ïðåäëîæåíèÿ è îòçûâû ìû áóäåì ðàäû âèäåòü â íàøåé ýëåêòðîïî÷òå: letters@fortrader.ru
http://www.fortrader.ru/arhiv.php

A detailed description of the parameters adviser available issue of the journal dated Iune 2, 
suggestions and feedback we will be glad to see in our e-mail: letters@fortrader.ru
http://www.fortrader.ru/arhiv.php

Looking for an interpreter for the English version of the magazine on partnership.

*/




extern string x="Íàñòðîéêè BB:";
extern int BB1 = 20;
extern int BB2 = 20;
extern int BB3 = 20;
extern string x1="Íàñòðîéêè RSI:";
extern int RSI = 14;
extern int predel = 6;
extern int otstup = 10; 

extern double Lots=1;

datetime Bar,sBar;int buy,sell,i,a,b,nbb3ok,vbb3ok,nbar;double Sstoploss,stoploss,setup2,rsi,okbuy,oksell;

int start()
  {
  if (Volume[0]>1){return(0); }

     buy=0;sell=0;
     for(  i=0;i<OrdersTotal();i++)
         {
           OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
           if(OrderType()==OP_BUY){buy=1;}
           if(OrderType()==OP_SELL){sell=1;}
         }   
   
   double vbb1 =iBands(NULL,0,BB1,1,0,PRICE_CLOSE,MODE_UPPER,1);
   double vbb2 =iBands(NULL,0,BB2,2,0,PRICE_CLOSE,MODE_UPPER,1);
   double vbb3 =iBands(NULL,0,BB3,3,0,PRICE_CLOSE,MODE_UPPER,1);
   double nbb1 =iBands(NULL,0,BB1,1,0,PRICE_CLOSE,MODE_LOWER,1);
   double nbb2 =iBands(NULL,0,BB2,2,0,PRICE_CLOSE,MODE_LOWER,1);
   double nbb3 =iBands(NULL,0,BB3,3,0,PRICE_CLOSE,MODE_LOWER,1);
  
  
  if(Low[1]<=nbb3 )
  { okbuy=0;  Bar=Time[1];
  
      for( i=predel;i>0;i--)
      {
      double rsi=iRSI(NULL,0,RSI,PRICE_CLOSE,i);
      if(rsi<30){nbb3ok=1;}
      }
  }
  
 
  if(okbuy==0 && nbb3ok==1 && Close[1]>nbb2 && buy==0)
  {okbuy=1;nbb3ok=0;a=0;
   stoploss=Low[iLowest(NULL,0,MODE_LOW,iBarShift(NULL,0,Bar,FALSE),1)]-otstup*Point;
   OrderSend(Symbol(),OP_BUY,Lots,Ask,3,stoploss,0,0,16385,0,Green);
  
  }
  
  for(i=0;i<OrdersTotal();i++)
  {
   OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
   if(OrderType()==OP_BUY )
   {  
    double setup2=OrderOpenPrice()+((OrderOpenPrice()-OrderStopLoss()));
    
          if(High[1]>vbb2)
       {
        OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);
       } 
       
      if(High[1]>setup2 && a==0)
      { 
         OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,White);
         OrderClose(OrderTicket(),OrderLots()/2,Bid,3,Violet); 
         a=1;
       }
 
       
    }      
  }
  
  /**********************************************sell**********************************************************/
  
    if(High[1]>=vbb3 )
  { oksell=0;  sBar=Time[1];
  
      for( i=predel;i>0;i--)
      {
      rsi=iRSI(NULL,0,RSI,PRICE_CLOSE,i);
      if(rsi>70){vbb3ok=1;}
      }
  }
 
  if(oksell==0 && vbb3ok==1 && Close[1]<vbb2 && sell==0)
  {oksell=1;vbb3ok=0;b=0;
   Sstoploss=High[iHighest(NULL,0,MODE_HIGH,iBarShift(NULL,0,sBar,FALSE),1)]+otstup*Point;
   OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Sstoploss,0,0,16385,0,White);
  }
  
  for(i=0;i<OrdersTotal();i++)
  {
   OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
   if(OrderType()==OP_SELL )
   {  
      setup2=OrderOpenPrice()-((OrderStopLoss()-OrderOpenPrice()));
      
       if(Low[1]<nbb2)
    {
     OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet);
    } 
     
      if(Low[1]<setup2 && b==0)
      {
       OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,White);
       OrderClose(OrderTicket(),OrderLots()/2,Ask,3,Violet); 
       b=1;
      }      
      
   
       
    }      
  }
  
  
   

   return(0);
  }

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---