Re: Trailing stop EA's

71
gaarmitaar wrote: Thu Jan 26, 2023 2:44 am Hello wonderfull people ,

and sorry for dumb question.

Do you know of any EA that can trail stop with custom indicator buffer ?
Cant find any....

Thank you very much !
Hi Gaarmitaar,

Think just about all the versions here are doing that. Or maybe I am not understanding your question.


Re: Trailing stop EA's

72
mrtools wrote: Thu Jan 26, 2023 3:33 am Hi Gaarmitaar,

Think just about all the versions here are doing that. Or maybe I am not understanding your question.
Hey Mrtools,

basically i want to use buffer 16 and 17 of this indicator as input for trailing stop EA
Was wondering if you guys know of any EA that can do that.
Thank for your time Btw , im not the developer but this indicator is a masterpiece

Re: Trailing stop EA's

73
gaarmitaar wrote: Thu Jan 26, 2023 4:40 am Hey Mrtools,

basically i want to use buffer 16 and 17 of this indicator as input for trailing stop EA
Was wondering if you guys know of any EA that can do that.
Thank for your time
Image


Btw , im not the developer but this indicator is a masterpiece
Gaarmitaar, imagine any of these Ea's in this thread would work, you just need to enter the iCustom call into the Ea.

Re: Trailing stop EA's

75
Having trouble calling the indicators buffers , as the indicator has a long list of inputs.
Right now the code doesnt compile.
If a master coder would be kind enough to point out my mistakes , i would be forever gratefull.

Code: Select all

double BBbuyValue(string symbol)
{
   double BBbuy  = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8,ClrGreen,ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,16,);
   return(BBbuy);
}

double BBsellValue(string symbol)
{
   double BBsell = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8, ClrGreen, ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,17,);
   return(BBsell);
}
i just used color green for every color cause i dont care , its just to trail stops in this case
last number is different , its the buffer number. The rest is the same.


Re: Trailing stop EA's

76
gaarmitaar wrote: Thu Jan 26, 2023 8:59 pm Having trouble calling the indicators buffers , as the indicator has a long list of inputs.
Right now the code doesnt compile.
If a master coder would be kind enough to point out my mistakes , i would be forever gratefull.

Code: Select all

double BBbuyValue(string symbol)
{
   double BBbuy  = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8,ClrGreen,ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,16,);
   return(BBbuy);
}

double BBsellValue(string symbol)
{
   double BBsell = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8, ClrGreen, ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,17,);
   return(BBsell);
}
Image
Image
Image
Image


i just used color green for every color cause i dont care , its just to trail stops in this case
last number is different , its the buffer number. The rest is the same.
On both iCustom calls you need something like barsToUse or something like

Code: Select all

double BBbuyValue(string symbol)
{
   double BBbuy  = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8,ClrGreen,ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,16,barsToUse);
   return(BBbuy);
}

double BBsellValue(string symbol)
{
   double BBsell = iCustom(symbol,"Advanced Dynamic Trend S Pro",false,false,false,false,false,false,false,false,false,true, true,true,false,true,8,8, ClrGreen, ClrRed, true, 2000, false, false ,true, ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,10,2,1,true,true,true,false,10,16,1,1440,4,6,1.5,1500,0.1,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,false,false,ClrGreen,ClrGreen,ClrGreen,ClrGreen,2,1,5,6,5,2,159,ClrGreen,ClrGreen,ClrGreen,ClrGreen,ClrGreen,4,ClrGreen,4,ClrGreen,3,ClrGreen,3,ClrGreen,3,ClrGreen,2,true,1,16,true,3,10,12,17,barsToUse);
   return(BBsell);
}
then in your external parameters can add

Code: Select all

extern int                barsToUse             = 2;         // Bands stop bar to use
you can do that or simply put a number there but remember if you use 0 it means an open bar, so best IMO to use anything > 0.
These users thanked the author mrtools for the post (total 2):
gaarmitaar, Cazz223


Who is online

Users browsing this forum: ChatGPT [Bot], DVanAssen, kvak, sunmetal, Telegram [Bot], TheJurgFX and 108 guests