hedge_Ron_v00

Price Data Components
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
0 Views
0 Downloads
0 Favorites

Profitability Reports

AUD/USD Oct 2024 - Jan 2025
61.00 %
Total Trades 3066
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -1.42
Gross Profit 6910.70
Gross Loss -11260.00
Total Net Profit -4349.30
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
21.00 %
Total Trades 2920
Won Trades 412
Lost trades 2508
Win Rate 0.14 %
Expected payoff -3.39
Gross Profit 2636.80
Gross Loss -12540.00
Total Net Profit -9903.20
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
58.00 %
Total Trades 2662
Won Trades 681
Lost trades 1981
Win Rate 0.26 %
Expected payoff -1.57
Gross Profit 5716.20
Gross Loss -9905.00
Total Net Profit -4188.80
-100%
-50%
0%
50%
100%
hedge_Ron_v00
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------+
//| Back Test Tester                   |
//+------------------------------------+
//

// generic user input
extern double Lots=0.1;
extern int TP=100;
extern int SL=50;

datetime bartime=0;


int start()
  {

   double p=Point();
   int      cnt=0;
   int      OrdersPerSymbol=0;

   double  I1=0;
   double  I2=0;
   
   bool IPOS, INEG;

   // Error checking & bar movement
   if(AccountFreeMargin()<(1000*Lots))        {Print("-----NO MONEY"); return(0);}
   if(Bars<100)                               {Print("-----NO BARS "); return(0);}
   if(Time[0]!=bartime)                       {bartime=Time[0];}

   OrdersPerSymbol=0;
   for(cnt=OrdersTotal();cnt>=0;cnt--)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if( OrderSymbol()==Symbol() )
        {
         OrdersPerSymbol++;
        }
     }

   // place new orders based on direction
   // only of no orders open
   if(OrdersPerSymbol==0)
     {
      OrderSend(Symbol(),OP_BUY, Lots,Ask,2,Ask-(SL*p),Bid+(TP*p),"BUY  "+CurTime(),0,0,White);
      OrderSend(Symbol(),OP_SELL,Lots,Bid,2,Bid+(SL*p),Ask-(TP*p),"SELL "+CurTime(),0,0,Red);
     } 

   return(0);
  } // start()




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 ---