Orders Execution
Checks for the total of open orders
0 Views
0 Downloads
0 Favorites
Chart1
#define IND 70

#import "c:\\ChartPlusChart\\SharedVarsDLLv2.dll"

 
 
 double   GetFloat@4 (int N);
 int   GetInt@4 (int N);
 //   Init@0 
 void   SetFloat@12 (int N, double Val);
 void    SetInt@8 (int N, int Val);
 


#import

int handle;
int st=0;
 
void init()
{
SetFloat@12(IND,Close[0]);
SetInt@8(IND,OrdersTotal());
SetFloat@12(IND+1,AccountBalance());

if(OrderSelect(0, SELECT_BY_POS)==true)
    {
    SetFloat@12(IND+2,OrderProfit()); 
    }else
    {SetFloat@12(IND+2,0);}





}








 
 
int start()
  {



SetFloat@12(IND,Close[0]);
SetInt@8(IND,OrdersTotal());
SetFloat@12(IND+1,AccountBalance());

 if(OrderSelect(0, SELECT_BY_POS)==true)
    {
    SetFloat@12(IND+2,OrderProfit()); 
    }else
    {SetFloat@12(IND+2,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 ---