• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:47pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:47pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

expert advisors 5 replies

Where can I learn how to code Expert Advisors? 21 replies

Post your top 10 expert advisors 0 replies

Expert Advisors Tutorial. 10 replies

Expert Advisors for Meta 4 6 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 280
Attachments: I code your Expert Advisors / Indicators
Exit Attachments

I code your Expert Advisors / Indicators

  • Last Post
  •  
  • 1 1112Page 131415 32
  • 1 12Page 1314 32
  •  
  • Post #241
  • Quote
  • Nov 3, 2009 3:48pm Nov 3, 2009 3:48pm
  •  GeraldFX
  • | Joined Sep 2009 | Status: Cloud Surfer | 540 Posts
I have this indicator. I tried to code it myself but i didnt get it to work. I want it to run the send mail function when the arrow of this indicator turns up. Can you help?

Thanks in advance!
Attached File
File Type: mq4 #### FxSoni_Entry_v3.a ####.mq4   6 KB | 497 downloads
 
 
  • Post #242
  • Quote
  • Nov 3, 2009 11:45pm Nov 3, 2009 11:45pm
  •  findmanu
  • | Commercial Member | Joined May 2009 | 70 Posts
Just digged around this thread... not sure if this will help... chk out http://www.forexfactory.com/showthread.php?t=134795
 
 
  • Post #243
  • Quote
  • Nov 3, 2009 11:57pm Nov 3, 2009 11:57pm
  •  findmanu
  • | Commercial Member | Joined May 2009 | 70 Posts
Hi Gerald,

I do think you sendmail function is in correct format. However, if you're still not getting an email, I think you've probably not configured your email correctly at Tools---> Options ---> Email? What do you think?

Quoting gerald20000
Disliked
I have this indicator. I tried to code it myself but i didnt get it to work. I want it to run the send mail function when the arrow of this indicator turns up. Can you help?

Thanks in advance!
Ignored
 
 
  • Post #244
  • Quote
  • Nov 4, 2009 4:38am Nov 4, 2009 4:38am
  •  GeraldFX
  • | Joined Sep 2009 | Status: Cloud Surfer | 540 Posts
Quoting findmanu
Disliked
Hi Gerald,

I do think you sendmail function is in correct format. However, if you're still not getting an email, I think you've probably not configured your email correctly at Tools---> Options ---> Email? What do you think?
Ignored
i am not sure because when i did a test function, it works awesomely. But it doesnt work with the indicator. So something must be wrong with the code, i guess.
 
 
  • Post #245
  • Quote
  • Nov 4, 2009 7:43am Nov 4, 2009 7:43am
  •  globalinvest
  • | Joined Sep 2007 | Status: Member | 258 Posts
Could you add a sound and pop-up box alert for RSI penetrating certain levels ?

Example: RSI 3 buy alert when level 55 is pierced and sell alert when level 45 is pierced.

Preferably only one sell and only one buy alert for each candle or waiting time of x seconds before a new alert can go off, so as to avoid permanent signals.

Same request here on this thread but it seems this alert does not exist yet:
http://www.forexfactory.com/showthre...85#post3200285
 
 
  • Post #246
  • Quote
  • Nov 5, 2009 3:58am Nov 5, 2009 3:58am
  •  kadok29
  • | Joined Feb 2009 | Status: Junior Member | 1 Post
I want to add "money/lot management " options to my expert advisor but i don't know the code i need to insert.

Can anyone add code for money management for me? This is the actual code:


//+------------------------------------------------------------------+
//| Simple RSI EA|
//| |
//| Use at your own risk. |
//| |
//+------------------- DO NOT REMOVE THIS HEADER --------------------+

#define SIGNAL_NONE 0
#define SIGNAL_BUY 1
#define SIGNAL_SELL 2
#define SIGNAL_CLOSEBUY 3
#define SIGNAL_CLOSESELL 4


extern int MagicNumber = 0;
extern bool SignalMail = False;
extern bool EachTickMode = True;
extern double Lots = 0.1;
extern int Slippage = 3;
extern bool UseStopLoss = False;
extern int StopLoss = 30;
extern bool UseTakeProfit = True;
extern int TakeProfit = 20;
extern bool UseTrailingStop = False;
extern int TrailingStop = 30;

int BarCount;
int Current;
bool TickCheck = False;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init() {
BarCount = Bars;

if (EachTickMode) Current = 0; else Current = 1;

return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit() {
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start() {
int Order = SIGNAL_NONE;
int Total, Ticket;
double StopLossLevel, TakeProfitLevel;



if (EachTickMode && Bars != BarCount) TickCheck = False;
Total = OrdersTotal();
Order = SIGNAL_NONE;

//+------------------------------------------------------------------+
//| Variable Begin |
//+------------------------------------------------------------------+


double Buy1_1 = iRSI(NULL, PERIOD_M30, 3, PRICE_CLOSE, Current + 0);
double Buy1_2 = 10;





//+------------------------------------------------------------------+
//| Variable End |
//+------------------------------------------------------------------+

//Check position
bool IsTrade = False;

for (int i = 0; i < Total; i ++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
IsTrade = True;
if(OrderType() == OP_BUY) {
//Close

//+------------------------------------------------------------------+
//| Signal Begin(Exit Buy) |
//+------------------------------------------------------------------+



//+------------------------------------------------------------------+
//| Signal End(Exit Buy) |
//+------------------------------------------------------------------+

if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy");
if (!EachTickMode) BarCount = Bars;
IsTrade = False;
continue;
}
//Trailing stop
if(UseTrailingStop && TrailingStop > 0) {
if(Bid - OrderOpenPrice() > Point * TrailingStop) {
if(OrderStopLoss() < Bid - Point * TrailingStop) {
OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen);
if (!EachTickMode) BarCount = Bars;
continue;
}
}
}
} else {
//Close

//+------------------------------------------------------------------+
//| Signal Begin(Exit Sell) |
//+------------------------------------------------------------------+



//+------------------------------------------------------------------+
//| Signal End(Exit Sell) |
//+------------------------------------------------------------------+

if (Order == SIGNAL_CLOSESELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange);
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Close Sell");
if (!EachTickMode) BarCount = Bars;
IsTrade = False;
continue;
}
//Trailing stop
if(UseTrailingStop && TrailingStop > 0) {
if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) {
if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) {
OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
if (!EachTickMode) BarCount = Bars;
continue;
}
}
}
}
}
}

//+------------------------------------------------------------------+
//| Signal Begin(Entry) |
//+------------------------------------------------------------------+

if (Buy1_1 < Buy1_2) Order = SIGNAL_BUY;



//+------------------------------------------------------------------+
//| Signal End |
//+------------------------------------------------------------------+

//Buy
if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}

if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;

Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}

//Sell
if (Order == SIGNAL_SELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}

if (UseStopLoss) StopLossLevel = Bid + StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Bid - TakeProfit * Point; else TakeProfitLevel = 0.0;

Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("SELL order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Open Sell");
} else {
Print("Error opening SELL order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}

if (!EachTickMode) BarCount = Bars;

return(0);
}
//+------------------------------------------------------------------+

Thanks!
 
 
  • Post #247
  • Quote
  • Nov 5, 2009 6:07am Nov 5, 2009 6:07am
  •  fxlan
  • | Joined Feb 2009 | Status: Member | 110 Posts
Ok i went through a sea of EA s and some too complicated, some without instructions that are maybe what i am looking for but i cant figure it out and one awesome that just puts a stop to BE.

But
I would like a EA which puts stops to BE at a certain number of pips (or at a certain price) and closes a chosen number of pips (my whole position is 0,5 and i want to close 0,2 and put to BE)...then again at a different number of pips (or at a certain price) i want the EA to take another 0,1 off the table and put the stoploss at a certain price (or you can lock certaion amount of pips)...and you leave the 0,2 lots to go to the next targeted location (if you want it to run you just put a price very far away)

For example:

I am short EUR/jpy from 133.50 for 5 microlots
I would like to put my SL to BE and close 2 microlots at 133.00
Then at 131.00 i would like to close another 2 microlots and put a stop at 133.05 lets say. And then leave the 1 micro lot to run forward to 1.29 or wherever.

If anyone could help me i would really really appreciate it.

Thank you everybody
 
 
  • Post #248
  • Quote
  • Nov 5, 2009 2:15pm Nov 5, 2009 2:15pm
  •  Rbi
  • | Joined Jan 2009 | Status: Member | 68 Posts
Hey,

Posted this on a separate thread... you don't have to actually mod it (although feel free). I'm just looking for a basic explanation as i'm doing this for learning purposes... check it out here:

http://www.forexfactory.com/showthread.php?t=205069

Thanks for your time!
 
 
  • Post #249
  • Quote
  • Nov 5, 2009 7:11pm Nov 5, 2009 7:11pm
  •  piphunter65
  • | Joined Nov 2009 | Status: Member | 31 Posts
Would it be possible to add code to this EA so that it only makes one
trade per signal? It should trade only when cci crosses zero and price is
above 62 ema for long and of course the opposite for a short. I use a set take profit and stoploss. When the take profit or stoploss is hit the EA then immediately opens a new position. Thanks in advance for anyone that can or is willing to help!

//+------------------------------------------------------------------+
//| This MQL is generated by Expert Advisor Builder |
//| http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ |
//| |
//| In no event will author be liable for any damages whatsoever. |
//| Use at your own risk. |
//| |
//+------------------- DO NOT REMOVE THIS HEADER --------------------+
#define SIGNAL_NONE 0
#define SIGNAL_BUY 1
#define SIGNAL_SELL 2
#define SIGNAL_CLOSEBUY 3
#define SIGNAL_CLOSESELL 4
#property copyright "Expert Advisor Builder"
#property link "http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/"
extern int MagicNumber = 0;
extern bool SignalMail = False;
extern bool EachTickMode = False;
extern double Lots = 1.0;
extern int Slippage = 3;
extern bool UseStopLoss = True;
extern int StopLoss = 30;
extern bool UseTakeProfit = True;
extern int TakeProfit = 60;
extern bool UseTrailingStop = True;
extern int TrailingStop = 30;
int BarCount;
int Current;
bool TickCheck = False;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init() {
BarCount = Bars;
if (EachTickMode) Current = 0; else Current = 1;
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit() {
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start() {
int Order = SIGNAL_NONE;
int Total, Ticket;
double StopLossLevel, TakeProfitLevel;

if (EachTickMode && Bars != BarCount) TickCheck = False;
Total = OrdersTotal();
Order = SIGNAL_NONE;
//+------------------------------------------------------------------+
//| Variable Begin |
//+------------------------------------------------------------------+

double Buy1_1 = iCCI(NULL, 0, 136, PRICE_TYPICAL, Current + 0);
double Buy1_2 = 0;
double Buy2_1 = iMA(NULL, 0, 1, 0, MODE_EMA, PRICE_CLOSE, Current + 0);
double Buy2_2 = iMA(NULL, 0, 62, 0, MODE_EMA, PRICE_CLOSE, Current + 0);
double Sell1_1 = iCCI(NULL, 0, 136, PRICE_TYPICAL, Current + 0);
double Sell1_2 = 0;
double Sell2_1 = iMA(NULL, 0, 1, 0, MODE_EMA, PRICE_CLOSE, Current + 0);
double Sell2_2 = iMA(NULL, 0, 62, 0, MODE_EMA, PRICE_CLOSE, Current + 0);


//+------------------------------------------------------------------+
//| Variable End |
//+------------------------------------------------------------------+
//Check position
bool IsTrade = False;
for (int i = 0; i < Total; i ++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
IsTrade = True;
if(OrderType() == OP_BUY) {
//Close
//+------------------------------------------------------------------+
//| Signal Begin(Exit Buy) |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Signal End(Exit Buy) |
//+------------------------------------------------------------------+
if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy");
if (!EachTickMode) BarCount = Bars;
IsTrade = False;
continue;
}
//Trailing stop
if(UseTrailingStop && TrailingStop > 0) {
if(Bid - OrderOpenPrice() > Point * TrailingStop) {
if(OrderStopLoss() < Bid - Point * TrailingStop) {
OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen);
if (!EachTickMode) BarCount = Bars;
continue;
}
}
}
} else {
//Close
//+------------------------------------------------------------------+
//| Signal Begin(Exit Sell) |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Signal End(Exit Sell) |
//+------------------------------------------------------------------+
if (Order == SIGNAL_CLOSESELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange);
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Close Sell");
if (!EachTickMode) BarCount = Bars;
IsTrade = False;
continue;
}
//Trailing stop
if(UseTrailingStop && TrailingStop > 0) {
if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) {
if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) {
OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
if (!EachTickMode) BarCount = Bars;
continue;
}
}
}
}
}
}
//+------------------------------------------------------------------+
//| Signal Begin(Entry) |
//+------------------------------------------------------------------+
if (Buy1_1 > Buy1_2 && Buy2_1 > Buy2_2) Order = SIGNAL_BUY;
if (Sell1_1 < Sell1_2 && Sell2_1 < Sell2_2) Order = SIGNAL_SELL;

//+------------------------------------------------------------------+
//| Signal End |
//+------------------------------------------------------------------+
//Buy
if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}
//Sell
if (Order == SIGNAL_SELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (UseStopLoss) StopLossLevel = Bid + StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Bid - TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("SELL order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Open Sell");
} else {
Print("Error opening SELL order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}
if (!EachTickMode) BarCount = Bars;
return(0);
}
 
 
  • Post #250
  • Quote
  • Nov 6, 2009 10:57pm Nov 6, 2009 10:57pm
  •  radatats
  • | Joined Jan 2006 | Status: Rad-FX | 22 Posts
Can you help me with either a script or an indicator to draw 2 boxes above and below the opening price of a given period (I use the H1)?

The boxes parameters should be :
-box should start at the open of the specified period and end just prior to the start of the next period
-price above/below opening should be adjustable
-box height in pips should be adjustable
-box colors should be adjustable


See the picture attached. Those are 1 hour boxes on a 1 minute chart. The concept is similar to Dolly Graphics but on a smaller time frame. Basically if price rises/falls into the box, take the trade. Exit either at top of the box or by whatever you like to use, MA cross, support, resistance, pivots etc. Start again on the next period. This gives me a new reference each hour for my trades.

Thanks for your consideration

Steve
Attached Image (click to enlarge)
Click to Enlarge

Name: boxes.gif
Size: 58 KB
No matter your system, money management is the key to success.
 
 
  • Post #251
  • Quote
  • Nov 7, 2009 4:22pm Nov 7, 2009 4:22pm
  •  snelsonibm
  • | Joined Mar 2007 | Status: member | 14 Posts
Hello Programmers,

I'm hoping someone can help me with some coding. I just want to be able to quantify the total amount of lots in open orders and assign that quantity to a variable like "totalLots". So if I had 7 trades open I want to be able to add up the total lots of all these trades so I can use the value to compare it to a percentage of balance value. I have a script I wrote that works great for me but needs this functionality. Much thanks in advance for any help someone can give.

Scott
 
 
  • Post #252
  • Quote
  • Nov 8, 2009 9:21am Nov 8, 2009 9:21am
  •  smok_signal
  • | Joined Mar 2009 | Status: Member | 24 Posts
Hi

I would like someone to help me develop a simple indicator.

The requirement is as below :

I want to find out what is % difference betweent LTP ( Last traded Price) and a perticular moving Average say 200 EMA or 50 EMA.

rgds,
Smok.
 
 
  • Post #253
  • Quote
  • Nov 9, 2009 5:53pm Nov 9, 2009 5:53pm
  •  trendgenius
  • | Joined Sep 2009 | Status: Member | 19 Posts
Think this NoLagMA EA would has good potential. I found this in another forum. But it needs some improvements. If anyone could add:
Short explanation:
//---- input parameters
extern int Price = 0; //Apply to Price(0-Close;1-Open;2-High;3-Low;4-Median price;5-Typical price;6-Weighted Close)
extern int Length = 20; //Period of NonLagMA
extern int Displace = 0; //DispLace or Shift
extern double PctFilter = 0; //Dynamic filter in decimal
extern int Color = 1; //Switch of Color mode (1-color)
extern int ColorBarBack = 1; //Bar back for color mode
extern double Deviation = 0; //Up/down deviation
extern int AlertMode = 1; //Sound Alert switch (0-off,1-on)
extern int WarningMode = 0; //Sound Warning switch(0-off,1-on)
The setting above are the same as the settings for the Indicator itself.

extern double lotsize = 0.05;//Lotsize to trade with
extern int sl = 100; //Stoploss
extern int trendpips = 30; //Trendchange in Pips
trendpips... if the trend changes and the current bid ishiger than the previous high on a downtrend or lower as the previous low on a uptrend with xx pips, than take profit.
extern int tp = 80; // Takeprofit on reversal sign by Priceaction
tp... if trend changes and the profit is bigger than xx Pips, than we take profit. if not, we dont.
extern int pipdiffrence = 20; // Pipdiffrence to avoid trades near the MA
extern int wait = 60; //Wait xx - minutes for next trade in same direction!
extern int conformation = 5; // Amount of pips, waiting for conformation of the trend
extern double pplotsize = 0.03; //Lotsize for Partial Profit
extern int ppdiffrence = 5; //Diffrence between High/Low and the current Bid/Ask to take PP in Pips
ppdiffrence... same as trendpips, just for the pp. To take profit faster
extern int ppfrom = 75; //Considering taking profit on candle Signals from x Pips
ppfrom... same as tp , just for the Partialprofit
extern int pptake = 150; //Take Profit, imidiatly
pptake ... If we reach xx pips, take the profit with Partial lotsize

--------------------------------
I'm not a coder myself but the EA could use some improvements.
a)Trading hours option is needed
b)Option to disable partial lots TP currently gives an ERROR if not used.
c)Magic Numbers may be needed.
d) many of the features could be removed to make the EA Simpler. I just want EA to BUY when trend is Blue and SELL when trend is red. Controlled by SL and TP mgt.
Attached Files
File Type: mq4 nonLagEAv0.5.mq4   16 KB | 335 downloads
File Type: mq4 NonLagMA_forEA.mq4   8 KB | 323 downloads
Failure is NOT an option
 
 
  • Post #254
  • Quote
  • Nov 11, 2009 9:16am Nov 11, 2009 9:16am
  •  artux786
  • | Joined Jun 2008 | Status: Member | 12 Posts
Hi our GREAT Programmer!!!

Can u please share with me simple script for open a multiple block of pair at one time, let say :

GBPUSD/EURUSD/AUDUSD - BUY
USDJPY/USDCHF - SELL


And then script for closed all that position at one time also

Thanking U in advance for ur kindness
 
 
  • Post #255
  • Quote
  • Nov 11, 2009 1:32pm Nov 11, 2009 1:32pm
  •  woosh
  • | Joined Oct 2009 | Status: Junior Member | 2 Posts
I was wondering if you can help me. I am looking for an alert for the gimme bar setup--any time frame. I am using the bands indicator under the custom indicator folder in MT4.

Thank you and have a nice day!
 
 
  • Post #256
  • Quote
  • Nov 11, 2009 9:15pm Nov 11, 2009 9:15pm
  •  AnonymousX
  • | Joined Jan 2008 | Status: Member | 114 Posts
Anyone want to program and/or backtest this?

EUR/USD pair;

50 point SL
50 point TP

Short or long based on previous days close.
(i.e. if the previous day closed higher we go long,
if it closed lower we go short)

Positions are opened as soon as the new (prior day) candle is formed.
 
 
  • Post #257
  • Quote
  • Nov 12, 2009 12:53am Nov 12, 2009 12:53am
  •  vasi
  • | Commercial Member | Joined Jun 2009 | 267 Posts
Quoting findmanu
Disliked
Hey Traders,

I love blogs / forums / micro-blogs and heck entire social media platforms.

However, I'm new to FF and loving threads like http://www.forexfactory.com/showthread.php?t=166658

So if anyone of you have some really interesting strategies that you're open to share it with the community, I'm absolutely open to do the coding (EA / Indicator / Script) and dedicate it to this community here.

Lets rock. If possible, lets beat the recession

PS: Any code that I write will be fully available for the entire...
Ignored
With the method that I trade, nothing is initiated until ADX rises above 25. In order not to have to remained glued to the computer, I’m hoping that you can code in an alert sound. I would like an alert sound to get my attention once ADX (+DI/-DI together with other line “that indicate strength or true range?”) rises above 25.


Thank you
Regards,
 
 
  • Post #258
  • Quote
  • Nov 13, 2009 12:47am Nov 13, 2009 12:47am
  •  ozmacca
  • | Joined Feb 2006 | Status: Member | 364 Posts
Hi Woosh,

I have this one Hope it helps
Attached File
File Type: mq4 GimmeeBar.mq4   5 KB | 354 downloads
Money grows on the tree of persistence
 
 
  • Post #259
  • Quote
  • Nov 13, 2009 3:32am Nov 13, 2009 3:32am
  •  woosh
  • | Joined Oct 2009 | Status: Junior Member | 2 Posts
Quoting ozmacca
Disliked
Hi Woosh,

I have this one Hope it helps
Ignored
Thanks ozmacca--and have a nice day!
 
 
  • Post #260
  • Quote
  • Nov 13, 2009 5:04pm Nov 13, 2009 5:04pm
  •  rdoane
  • | Joined Apr 2009 | Status: Junior Member | 1 Post
I'm using an indicator that I would like to get semi-automated.
At the moment, I'm ust trying to initiate or close a trade if I'm away from the desk.

I'm using DXTrade C4 Nitro Dashboard.ex4 from the C4 Scalping thread.

This gives alerts like:
DXTrade C4/Nitro BUY: EURUSD @ 1.49158 (19:26)
DXTrade C4/Nitro SELL: EURUSD @ 1.49150 (19:26)

The question is:
Is it possible for MetaTrader to capture an alert when it displays and parse the message to initiate a trade???
 
 
  • Commercial Content
  • /
  • I code your Expert Advisors / Indicators
  • Reply to Thread
    • 1 1112Page 131415 32
    • 1 12Page 1314 32
0 traders viewing now
  • More
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022