| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
||||
|
Quote:
Code:
double OrderArray[][3];
ArrayResize( OrderArray, OrdersTotal() );
cnt = 0;
for (cnt = 0; cnt< OrdersTotal(); cnt++)
{
if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() )
{
OrderArray[cnt][PROFIT] = OrderProfit() + OrderSwap();
OrderArray[cnt][OPEN] = OrderOpenPrice();
OrderArray[cnt][LOTS] = OrderLots();
if(OrderType() == OP_BUY)
{
double BuyLots;
BuyLots += OrderArray[cnt][LOTS];
MaxBuyLots =ArrayMaximum(OrderArray);
}
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein Last edited by Nicholishen; 09-12-2006 at 06:17 AM. |
|
||||
|
Quote:
Code:
double OrderArray...[];
ArrayResize( OrderArray, OrdersTotal() );
cnt = 0;
for (cnt = 0; cnt< OrdersTotal(); cnt++)
{
if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() )
{
OrderArrayProfit[cnt] = OrderProfit() + OrderSwap();
OrderArrayOpen[cnt] = OrderOpenPrice();
OrderArrayLots[cnt] = OrderLots();
if(OrderType() == OP_BUY)
{
double BuyLots;
BuyLots += OrderArrayLots[cnt];
MaxBuyLots =ArrayMaximum(OrderArrayLots);
}
Code:
double OrderArray[][3];
ArrayResize( OrderArray, OrdersTotal() );
cnt = 0;
for (cnt = 0; cnt< OrdersTotal(); cnt++)
{
if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() )
{
OrderArray[cnt][PROFIT] = OrderProfit() + OrderSwap();
OrderArray[cnt][OPEN] = OrderOpenPrice();
OrderArray[cnt][LOTS] = OrderLots();
if(OrderType() == OP_BUY)
{
double BuyLots;
BuyLots += OrderArray[cnt][LOTS];
}
double MBL;
for(int i=0;i<OrdersTotal();i++){
if(OrderArrayLots[i][LOTS]>MBL)MBL=OrderArrayLots[i][LOTS];
}
MaxBuyLots =MBL;
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein |
|
||||
|
Here's another example of a function that tracks tight trailing stops across multiple trades on the same currency by pairing trailing data with the corresponding trade's ticket number - using arrays. Maybe this will help give you some ideas as well.
PHP Code:
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein |
|
||||
|
Thanks again!
I changed the 3rd from the last line to this Code:
if(OrderArray[i][LOTS]>MBL)MBL=OrderArray[i][LOTS]; Thanks Again!!!! dee |
|
||||
|
Quote:
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein |
|
|||
|
HI CG,
Is it possible programatically to do the following action. a. To delete an indicator from a chart. b. Wait for "X" time. c. Reload the Indicator. d. Wait for "X" time. e. Repeat from "a". If it is possible, can you please post it in the forum. Thanks in advance. ![]() |
|
||||
|
Quote:
Send Keyboard keys to MetaTrader! and Programmatically Refresh your charts The idea is to send keys to MetaTrader, the keys you might need: Ctrl+I to open Indicator list window. Then Send the first letter of the Indicator's name key (For example: C for CCI). Then you have to send ALT_D to delete the indicator then send ESC key. Hope it works! |
![]() |
| Bookmarks |
| Tags |
| histogram, forex |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 09:53 PM | |