[Archive!] I will write any expert or indicator for free. - page 76

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Here you go, this one shows the previous week's channel:
Greetings, esteemed programmers. The Signallibrary.mq4 library file contains entry conditions by MA, please help me to change the function to entry conditions not by MA but by the code below. In other words, there is a ready code, just help to put it correctly into this function.
#property library
//The function is executed on every tick and should return the "BUY" string if we have a signal to buy,
//and "SELL" if we have a sell signal. The function can be rewritten as you wish, but
//the format of the returned value must be preserved.
string GetSignal()
{
int sig=0;
int MAPeriod = 10;
double MA1 = iMA(Symbol(),0,MAPeriod,0,MODE_EMA,PRICE_WEIGHTED,1);
double MA2 = iMA(Symbol(),0,MAPeriod,0,MODE_EMA,PRICE_WEIGHTED,2);
double MA0 = iMA(Symbol(),0,MAPeriod,0,MODE_EMA,PRICE_WEIGHTED,0);
double Price0 = iMA(Symbol(),0,1,0,MODE_EMA,PRICE_WEIGHTED,0);
double Price1 = iMA(Symbol(),0,1,0,MODE_EMA,PRICE_WEIGHTED,1);
double Price2 = iMA(Symbol(),0,1,0,MODE_EMA,PRICE_WEIGHTED,2);
if ( MA1>MA2 && MA0>MA1 &&
((Price1>MA1 && Price2<MA2)||(Price1>MA1 && Price0>MA0))) sig=1;
if (MA1<MA2 && MA0<MA1 &&
((Price1<MA1 && Price2>MA2)||(Price1<MA1 && Price0<MA0))) sig=-1;
if (sig==1) return ("BUY"); else if (sig==-1) return ("SELL"); else return ("");
}
That is, the signals must be as shown in this code instead of MA:
int start()
{
//----
int i,
_sigType=-1;
string _objectName;
if (Volume[0]>1) return;
for (i=0; i<=5; i++){
_semafor[i]=iCustom(Symbol(),0, "3_Level_ZZ_Semafor",Period1,Period2,Period3,Dev_Step_1,Dev_Step_2,Dev_Step_3,Symbol_1_Kod,Symbol_2_Kod,Symbol_3_Kod,i,1);
}
if (_semafor[0]==_semafor[2] && _semafor[2]==_semafor[4] && _semafor[4]!=0){
Alert("Get signal Buy");
_sigType=OP_BUY;
_OrderOpen(_sigType);
}
if (_semafor[1]==_semafor[3] && _semafor[3]==_semafor[5] && _semafor[5]!=0){
Alert("Get signal Sell");
_sigType=OP_SELL;
_OrderOpen(_sigType);
}
//----
return(0);
}
Is it possible to write a strength index indicator with parameter 2 that will display the selected higher one on a lower timeframe and draw the same curve as on a higher one? I would like to thank you.
Just don't make other people's mistakes 'EA fast(1-5 hours) for $10.Script for $5'.
Can you redo the advisor exactly the opposite? And how much will it cost.