Keep On Trading

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Keep On Trading

Postby Caihouela » Thu Mar 04, 2010 4:41 pm

Bonsoir,
Je vous fait faire un petit voyage vers la France.

J'ai trouvé un indicateur de tendance de court terme assez efficace et simple d'interprétation.
Voici le lien : http://www.o-bo.com/keep-on-trading-un-indicateur-visuel-pour-connaitre-la-tendance-court-terme/

Pensez-vous qu'il serait possible de le coder en langage *.LUA ?

Merci d'avance
Caihouela
 
Posts: 3
Joined: Sat Feb 27, 2010 1:16 pm

Re: Keep On Trading

Postby Nikolay.Gekht » Mon Mar 08, 2010 12:23 pm

Bonjour!

Je dois pour quelque temps traduire l'article original à l'anglais ou au russe. Je répondrai aussitôt que possible, quand la tâche sera plus claire pour moi.

Désolé de mon français, j'ai utilisé le traducteur en ligne.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Keep On Trading

Postby Caihouela » Mon Mar 08, 2010 1:38 pm

Merci pour votre aide et votre détermination.
Bon courage !!!
Caihouela
 
Posts: 3
Joined: Sat Feb 27, 2010 1:16 pm

Re: Keep On Trading

Postby Shadow77 » Wed Apr 21, 2010 4:12 am

Hello,

Here is the MT4 code for this indicator, can you please have a look and translate it to marketscope

Thanks in advance for your precious help
Code: Select all
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_color3 Lime
#property indicator_color4 Red




extern double aa = 0.1;
extern int bb = 10;
extern int MA = 3;
double signal = 0;
double flag = 0;
double kothigh=0, kotlow=0;

//---- indicator buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double SYMBOL_BUY[];
double SYMBOL_SELL[];
//----
int ExtCountedBars=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
   //---- indicators
   IndicatorBuffers(2);
   //---- indicator buffers mapping
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2);
   SetIndexStyle(2, DRAW_ARROW);
   SetIndexStyle(3, DRAW_ARROW);
   
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
   
   short_name="Keep On Trading - v3 ("+bb+")";
   IndicatorShortName(short_name);
   
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2, SYMBOL_BUY);
   SetIndexBuffer(3, SYMBOL_SELL);
   SetIndexArrow(2, 241);
   SetIndexArrow(3, 242);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   if(Bars<=bb) return(0);
   ExtCountedBars=IndicatorCounted();
   //---- check for possible errors
   if (ExtCountedBars<0) return(-1);
   //---- last counted bar will be recounted
   if (ExtCountedBars>0) ExtCountedBars--;
   
   kot();

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

void kot(){
   double sum=0;
   int    i,pos=Bars-ExtCountedBars-1;
   


   //---- initial accumulation
   if(pos<bb) pos=bb;
   for(i=1;i<bb;i++,pos--) sum+=Close[pos];
   
   
   //---- main calculation loop
   while(pos>=0)
     {
     
         kothigh=iMA(Symbol(),0,MA,0,MODE_LWMA,PRICE_HIGH,pos) + (aa * iATR(Symbol(),0,bb,pos));
         kotlow =iMA(Symbol(),0,MA,0,MODE_LWMA,PRICE_LOW,pos) - (aa * iATR(Symbol(),0,bb,pos));

         if(Close[pos] < Low[pos+1] && Close[pos] < Low[pos+2]) flag = -1;
         if(Close[pos] > High[pos+1] && Close[pos] > High[pos+2]) flag = 1;

         if(flag == 1){
            signal = kotlow;
            ExtMapBuffer2[pos]=signal;
         }
         if(flag == -1){
            signal = kothigh;
            ExtMapBuffer1[pos]=signal;
         }
      pos--;
     }
     
}
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am

Re: Keep On Trading

Postby Nikolay.Gekht » Wed Apr 21, 2010 9:07 am

Thank you. This makes the task much easier!
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Keep On Trading

Postby Shadow77 » Thu Apr 22, 2010 7:14 pm

Hello, Do you think it will be possible to have this indicator before the week-end.
Thanks in advance for your great job on all of this indicator... :)
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am

Re: Keep On Trading

Postby Nikolay.Gekht » Fri Apr 23, 2010 8:00 am

I'll try but can't promise surely.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests