Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
What value returns the function iTime? Is it start date of a bar? There is written only "Returns Time value for the bar of indicated symbol with timeframe and shift." in the manual.
What value returns the function iTime? Is it start date of a bar? There is written only "Returns Time value for the bar of indicated symbol with timeframe and shift." in the manual.
Been trying to add the following parameters to this EA, but am having problems getting it to work. Can someone help code it, or atleast show me how to code it. Any help would be appreciated.
Take Profit
Stop Loss
Trailing Stop
Max Concurrent trades
Thanks!
PHP Code:
//---- input parameters
extern double Lots=0.1;
extern int Slippage=5;
int MagicNum = 98760;
bool longPosOpened, shortPosOpened;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
void CloseAllOpenAndPendingTrades()
{
int total = OrdersTotal();
for(int i=total-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);
if(Symbol() != OrderSymbol()) continue; // important! only close positions of current currency pair
int type = OrderType();
bool result = false;
switch(type)
{
//Close opened long positions
case OP_BUY : result = OrderClose( OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 200);
break;
//Close opened short positions
case OP_SELL : result = OrderClose( OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_ASK), 200);
break;
//Close pending orders
case OP_BUYLIMIT :
case OP_BUYSTOP :
case OP_SELLLIMIT :
case OP_SELLSTOP : result = OrderDelete( OrderTicket() );
}
}
return(0);
}
Last edited by fireslayer26; 09-02-2008 at 11:58 PM.
Hello, just wondering if one of you great coders can just add in the code to close ALL orders once g_MinProfit and f_MinProfit is hit. What I find is when profit is hit there are left over Buy/Sell Stop/Limit order stragglers and would just like them ALL deleted once profit min is triggered.
:: did use some more keys for this one... but u can use it for other currencies also, was only set for EURUSD... don't know why, you will know better I hope
:: did use some more keys for this one... but u can use it for other currencies also, was only set for EURUSD... don't know why, you will know better I hope
Hi
This Ea need forex_Nn_Ind_juna.ex4 indicator, i need this indicator have you it?
I please need Price(Close) crossing EMA Indicator with Alert
I am in need of an indicator with alert
It should be in seperate indicator window and have sound alert
I need it in histogram that changes colour
barlength=EMA(externalparameter)-close
if barlengthnow<barlengthprevious then bar is red
if barlengthnow>barlengthprevious then bar is green
if barlengthnow=barlengthprevious then bar is yellow
see example of bars below in pic
must offer sound alert if external parameter is set when bar change from red to green or fromgreen to red and also when bar is crossing zero line
Hello,
My current EA generates buys/sells based off the daily time frame of an indicator. This causes trades to be opened at 00:00 when the correct conditions are met. How can I change the starting time of the daily time frame? For example, right now the daily bar opens at 00:00 and closes at 24:00. I need to make the bar opens at a different time, say 02:00, not 00:00.
Any help would be greatly appreciated! My main goal is to spread out my trades throughout the day so im not always buying/selling at the same time. This would allow for more trades : )
*bump* for my previous post on page 125. I just saw that I didnt put the parameters I wanted on there. They are there now, so if anyone can help I'd appreciate it!!