EA DTosc ... sorry!

Hello everybody,

Sorry but i m newbie…
I would like to create a simple EA based indicator Dtosc:
BUY cross <30
SELL cross >70

I start with indicator but I can’t turn it into an EA.
Please, can someone kindly show me what are the first steps?

This is wrong:
if (SD > SK )
{
Opn_B=true;
}
if (SD < SK)
{
Opn_S=true;
}

I USED THIS INDICATOR----

//±-----------------------------------------------------------------+
//±-----------------------------------------------------------------+
#property copyright “”

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_width1 2
#property indicator_width2 2
#property indicator_level1 30
#property indicator_level2 70

extern int PeriodRSI =13;
extern int PeriodStoch= 8;
extern int PeriodSK = 5;
extern int PeriodSD = 3;
// 0 = SMA
// 1 - EMA
// 2 - SMMA
// 3 - LWMA
extern int MAMode=0;

double SK[];
double SD[];
double StoRSI[];
double RSI[];

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
int init()
{
IndicatorBuffers(4);
SetIndexBuffer(0,SK);
SetIndexBuffer(1,SD);
SetIndexBuffer(2,StoRSI);
SetIndexBuffer(3,RSI);
IndicatorShortName(“DTOSC (”+PeriodRSI+","+PeriodStoch+","+PeriodSK+","+PeriodSD+")");
return(0);
}
int deinit() { return(0); }

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
int start()
{
int i,limit;
int counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars–;
limit=Bars-counted_bars;

for(i=limit; i>=0; i–)
{
RSI[i] = iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i);
double LLV = RSI[ArrayMinimum(RSI,PeriodStoch,i)];
double HHV = RSI[ArrayMaximum(RSI,PeriodStoch,i)];
if ((HHV-LLV)!=0)
StoRSI[i] = 100.0*((RSI[i] - LLV)/(HHV - LLV));
else StoRSI[i] = 0;
}
for(i=limit; i>=0; i–) SK[i]=iMAOnArray(StoRSI,0,PeriodSK,0,MAMode,i);
for(i=limit; i>=0; i–) SD[i]=iMAOnArray( SK,0,PeriodSD,0,MAMode,i);
return(0);
}

THANKSSSSSSSS

Yeah… Sorry… I don’t think anyone on this forum is your b**ch to do your work…

Try this.
Expert Advisor Builder for MetaTrader 4

Come now Clark… didn’t you notice the line? you know…the one over by the sign that says “sign up for b***h work here” ?

Sheesh…and you’d think this is a trading forum or something to do with learning.

Jay

P.S. I have that indicator we talked about ready for coding…i’ll just send it over per your request :stuck_out_tongue:

chill out guys

Please, can someone kindly show me what are the first steps?

The OP never asked you to code anything.

http://forums.babypips.com/rate-my-software/41774-rate-my-ea-creation-tool.html
That thread has a link to the best free(for now) EA builder I have used. It does not have a lot of documentation but if you get stuck just ask on the thread above. I am pretty sure it will make what you are looking for. At the very least it will give you some code that you can modify.

Actually shrek, it was more of an inside joke between me and clark, at least my post was. didn’t mean to come off strong, but the misunderstading would be… understandable.

I"m outta here for now… as I’m about as knowledgeable with coding/tech suff as I am about the end days and all eternity.

Jay