View Single Post
  #30 (permalink)  
Old 03-16-2007, 12:21 AM
Pcontour's Avatar
Pcontour Pcontour is offline
Senior Member
 
Join Date: Nov 2006
Location: Canada
Posts: 176
Pcontour is on a distinguished road
Daraknor,

I have time for one suggestion today. New stuff in Red.

---- Variables Section

#property copyright "Copyright PhoenixFund under QPL License. www.bestforextools.com/pf/"

#define Buy +1
#define Sell -1
#define None 0


---- Signals Section

{
int Signal=None;

double HighEnvelope1 = iEnvelopes(NULL,0,P_EnvelopePeriod,MODE_SMA,0,PRIC E_CLOSE,P_Percent,MODE_UPPER,1);
double LowEnvelope1 = iEnvelopes(NULL,0,P_EnvelopePeriod,MODE_SMA,0,PRIC E_CLOSE,P_Percent,MODE_LOWER,1);
double CloseBar1 = iClose(NULL,0,1);

if(CloseBar1 > HighEnvelope1) {Signal=Sell;}
if(CloseBar1 < LowEnvelope1) {Signal=Buy;}

Debug("Signal 1 "+Signal+" HighEnv:"+HighEnvelope1+" LowEnv:"+LowEnvelope1+" Close:"+CloseBar1);

return (Signal);
}



I couldn't compile with Currenttime I used Time[0]

I'll send you my version where I updated this. It's a lot easier for me to understand. You should make sure that I didn't reverse the buy and the sell.

Last edited by Pcontour; 03-16-2007 at 12:27 AM.
Reply With Quote