Forex Factory (https://www.forexfactory.com/)
-   Platform Tech (https://www.forexfactory.com/forum/69-platform-tech)
-   -   I will code your EAs and Indicators for no charge (https://www.forexfactory.com/thread/166758-i-will-code-your-eas-and-indicators-for)

cgninvesting Oct 17, 2020 9:54pm | Post# 40421

1 Attachment(s)
{quote} CGN, These options are already available in the EA I uploaded. You can choose your preferred time frame from the drop down menu. {image}This applies to the MACD, CCI and now the 200 and 20 EMAs (file attached. {quote} This request is a bit vague. Not sure what you mean by highest TF. Anyway the entry criteria function is located from lines 278 to 293. {image}If by highest TF you mean the Monthly time frame then simply uncomment (remove "/*" and "*/") from the sections of the code highlighted in the red rectangle and arrow. If you mean another...
Hi Pett,

Sorry if I wasn't clear enough on my lastest request, you're being really helpful. What I meant by highest TF was the entry candle must be the same color as the TF choosen for the 200 ema.

Also I have a doubt regarding the code. On this picture you've attached in the function located in line 281 shouldn't the MACD&CCI direction be up and down in the line 288? I've no coding clue so sorry if this is completely wrong.

Click to Enlarge

Name: code.png
Size: 23 KB

Many thanks Pett!

Best,
CGN

Pett Oct 17, 2020 10:29pm | Post# 40422

1 Attachment(s)
Hi @BlueRain and anyone else who looked into the issue I had raised earlier, I finally got the function to work! After hours of hitting dead end trial and errors I stumbled upon a KAMA function that was developed by @Mladen (salut!) some years back. The function's coding is way above my head and I honestly need some time to fully grasp it. Anyway thanks largely to that function and some tinkering, it's now possible to access the KAMA value of any symbol for any time frame and shift from the current chart.

Name:  KAMA.png
Views: 955
Size:  8 KB
Weirdly, I was also getting out of range errors in some pairs but restarting MT4 seems to have solved this. Its probably best to wait until markets are live to make an informed assessment. I am posting the code here for anyone interested.

Inserted Code
double Kama(string symb, int _per, int kper, int kfast, int kslow, int shift)
  {
//----
double close_array[];
double KAMA[];
ArraySetAsSeries(close_array,true);
CopyClose(symb,_per,0, Bars, close_array); 
 int counted_bars=IndicatorCounted();
      if(counted_bars<0) return(-1);
      if(counted_bars>0) counted_bars--;
         int limit = MathMin(Bars-counted_bars,Bars-1);
ArrayResize(KAMA, Bars);

 for(int i=limit; i>=0; i--)
     {
        KAMA[i]   = iKama(close_array[i],kper,kfast,kslow,2,i);
     }      
return(KAMA[shift]);
} 

double  kWork[][3];
#define _kprice 0
#define _kdiff  1
#define _kama   2
double iKama(double tprice, int period, double gFast, double gSlow, double gCoeff, int i, int instanceNo=0)
{
   if (ArrayRange(kWork,0)!=Bars) ArrayResize(kWork,Bars); int r = Bars-i-1; instanceNo*=3; kWork[r][instanceNo+_kprice] = tprice;
   if (r < period) { kWork[r][instanceNo+_kama] = tprice; kWork[r][instanceNo+_kdiff] = 0; return(kWork[r][instanceNo+_kama]); }
   
   
   double efratio = 1.00;
   double fastend = (2.0 /(gFast + 1));
   double slowend = (2.0 /(gSlow + 1));
   double smooth;
   double signal;
   double noise = 0;
          signal                      = MathAbs(kWork[r][instanceNo+_kprice]-kWork[r-period][instanceNo+_kprice]);
          kWork[r][instanceNo+_kdiff] = MathAbs(kWork[r][instanceNo+_kprice]-kWork[r-1][instanceNo+_kprice]);
          for (int k=0;k<period;k++)
                  noise += kWork[r-k][instanceNo+_kdiff];
          if (noise != 0) efratio = signal/noise;
                          smooth                     = MathPow(efratio*(fastend-slowend)+slowend,gCoeff);
                          kWork[r][instanceNo+_kama] = kWork[r-1][instanceNo+_kama] + smooth*(kWork[r][instanceNo+_kprice]-kWork[r-1][instanceNo+_kama]);
   return(kWork[r][instanceNo+_kama]);
}

Pett Oct 17, 2020 11:07pm | Post# 40423

1 Attachment(s)
What I meant by highest TF was the entry candle must be the same color as the TF choosen for the 200 ema.
If that's the case then here you go.
Candle Color EA.mq4Now whichever time frame you select for the 200 ema will also be automatically selected for the high TF candle. Please review the attached file and compare the changes made to the previous one. You can only learn by doing.

Also I have a doubt regarding the code. On this picture you've attached in the function located in line 281 shouldn't the MACD&CCI direction be up and down in the line 288?
The functions for MACD and CCI return true if the filters are turned off. They also return true when the buy or sell filter conditions are met. So the criteria is that as long as the MACD/CCI have returned true and the MACD/CCI signal IS NOT (note the "!=" which is not the same as the others "==") the opposite signal then the signal is valid. I cannot insist enough how important it is for you to review the files and comparing the changes so you can understand how your requests are implemented as code. It will then be way easier for you to shift from abstract to practical.

All the best.

ElectricSavant Oct 18, 2020 2:51am | Post# 40424

1 Attachment(s)
Thanks coders for using your time in this forum this way.

I would like to turn this EA on and off. Can I get a button? Late Edit: I trade multiple symbols I would also like to be able to turn it off for each symbol, while leaving it on for the other symbols. Having a trading panel would be awesome but not mandatory.
FXF Safe Trend Scalp V1 Codebase.mq4

mntiwana Oct 18, 2020 3:03am | Post# 40425

please can any one make this indicator 4 time frame bar in snakeforse remove 2 and 3 colour keep only 0 and 1 {file} {file}
Both declared repainter since long ago -

mntiwana Oct 18, 2020 3:10am | Post# 40426

Can anyone code my Brilliant reversal ex4 to Mt5 {file}
Welcome to FF
Try using any "Fractal" or "zigzag" kinda stuff - of course repaints,be care about

afsarfx Oct 18, 2020 5:08am | Post# 40427

{quote} Both declared repainter since long ago -
i know its repaint but i need please can make it
if not possible please add mtf option in solar wind thanks

RoninTheory Oct 18, 2020 6:50am | Post# 40428

{quote} Always try to post illustrating picture (for others to get idea) not to link out source - a kind of rude,selfish and time consuming act display wise "XO" and "point and figure" indicators (from mt4) can possibly give that type display but math calculation must be different,no idea {image} {image}
may i ask what these are or what they are derived from?

T4Trade Oct 18, 2020 6:52am | Post# 40429

{quote} Fantastic! BlueRain, adding the extra space has solved the candle numbers hiding issue. I appreciate you prompt help and being with me. Have a great weekend Kind Regards, Moti {image}
thanks for the beautiful idea and coding indcatr,how about adding push notification please?

bdunn Oct 18, 2020 7:01am | Post# 40430

1 Attachment(s)
Hi All:

I trying to create a very simple Histogram indicator that simply plot the value of Current Volume multiply with Current Typical Price. I have zero knowledge of programming. I guess I did something wrong on the coding but I can't find any good example for correcting the codes.

Can someone take a look on the attached mql4 file and shed some light, or, help me out how to code it correctly?

Volume x Typical Price.mq4
Many many thanks in advance!

With Respect to All Helpers,
Bill

P/S: Not in discussion on Volume issue on decentralized forex trading

romeo000 Oct 18, 2020 7:13am | Post# 40431

7 Attachment(s)

Coders & Programmers ,Attention Please!


I need a program or an EA with following requirements, i hope you guys can help me and many others also as this program will also be of their help of that i am sure.
It will mainly serve as a scanner for all 28 pairs and in my opinion it should be a program to work properly!

Okay so first of all i need it to read data from 3 different indicators of MT4
let me post the screenshots and details of those indicators!

First indicator tells me about trend reversals and pullbacks (it repaints)

Attachment 3768394
Indicator name : PH_ZZ.ex4
Indicator Settings: Attachment 3768395Second Indicator is a simple MA crossover which works as a confirmation indicator for me
Indicator name: PH_MAC.ex4
Indicator settings: Attachment 3768398and moving on to third and our final indicator
indicator name: Agimatfx2020_ConCNN.mq4
settings: Attachment 3768399
Now what should the required program do?
it should check data for all 3 indicators
check for requirements

for LONG:
Trend Reversal Signal Appeared in Downtrend (PH_ZZ)
ARROW UP appeared (PH_MAC)
Agimat Indicator generates a box below candle indicating the BUY signal

for SHORT:
Trend Reversal Signal Appeared in Uptrend (PH_ZZ)
ARROW DOWN appeared (PH_MAC)
Agimat Indicator generates a box above candle indicating the SELL signal


Note: All three requirements must be aligned respectively as they are enlisted.

When ALL the requirements are met our program should notify us to go LONG or SHORT
Must:

  1. The program must scan for all the pairs at a time
  2. There should be an option to choose Time-frame on which the Program will scan Pairs.


Once we are done with this, there are some more additions which can be added later on, but these are basic requirements for now!

Thanks!
Regards: Romeo
AgimatFX2020_ConCNN.mq4
PH_MAC.ex4
PH_ZZ.ex4


Motiram Oct 18, 2020 8:20am | Post# 40432

1 Attachment(s)
Hello BlueRain,

Please I have 2 requests could you fulfilled these when it is possible for you no hurry.

1) Place candles number back from the current candle like 1, 2, 3 etc having input the numbers of back candle to show MTF.

2) Show the time of each candle below of the each candle with option input the numbers of back candle to show the time on MTF.

I did intense search for couple of day's goggle, forexfactory and all the possible way but did not get such indicator.

Please if you find appropriate could you help to make them 2 separate indicators.

Image is attached for details on 1 chart for the both of indicators.

Regards
Moti
Click to Enlarge

Name: EURNZDH1 Candle Number And Time.png
Size: 31 KB

ardalan91 Oct 18, 2020 8:53am | Post# 40433

{quote} Welcome to FF Try using any "Fractal" or "zigzag" kinda stuff - of course repaints,be care about
Hi

thank you for contribution in this thread.

I have question about ("averages - mtf" by Mr. mladen) indicator, is it possible to add this indicator on another indicator window?

or is there any other indicator which shows the slope of indicator?

Thank you.

Michael20201 Oct 18, 2020 9:01am | Post# 40434

Can anyone code my Brilliant reversal ex4 to Mt5 {file}
Can anyone turn this ex4 to ex5

mntiwana Oct 18, 2020 10:06am | Post# 40435

{quote} may i ask what these are or what they are derived from?
These are "XO" and some other stuff

mntiwana Oct 18, 2020 10:09am | Post# 40436

{quote} Hi thank you for contribution in this thread. I have question about ("averages - mtf" by Mr. mladen) indicator, is it possible to add this indicator on another indicator window? or is there any other indicator which shows the slope of indicator? Thank you.
Try posting some illustrating/example picture/s how you want for to have better idea

BlueRain Oct 18, 2020 11:39am | Post# 40437

Hello BlueRain, Please I have 2 requests could you fulfilled these when it is possible for you no hurry. 1) Place candles number back from the current candle like 1, 2, 3 etc having input the numbers of back candle to show MTF. 2) Show the time of each candle below of the each candle with option input the numbers of back candle to show the time on MTF. I did intense search for couple of day's goggle, forexfactory and all the possible way but did not get such indicator. Please if you find appropriate...
1. Easy one.... I have one already privately - it starts from index 0 but I can change to 1.
2. Candle Open Time?

Why 2 separate indicators?

Motiram Oct 18, 2020 12:36pm | Post# 40438

{quote} 1. Easy one.... I have one already privately - it starts from index 0 but I can change to 1. 2. Candle Open Time? Why 2 separate indicators?
Hello BlueRain,

Thank you for your response

1. Easy one.... I have one already privately - it starts from index 0 but I can change to 1.

Wow I will be gratefully to you if you can change it index 0 to 1 please.

2. Candle Open Time?

It must show the time of candle as show the vertical line without the date below the each candle. Yes you are correct it can be the open time

Why 2 separate indicators?

It is better not to mass the chart one can use separately as needed please if I am not giving you a much trouble can you make them separately.

Regards
Moti

BlueRain Oct 18, 2020 1:39pm | Post# 40439

3 Attachment(s)
{quote} Hello BlueRain, Thank you for your response 1. Easy one.... I have one already privately - it starts from index 0 but I can change to 1. Wow I will be gratefully to you if you can change it index 0 to 1 please. 2. Candle Open Time? It must show the time of candle as show the vertical line without the date below the each candle. Yes you are correct it can be the open time Why 2 separate indicators? It is better not to mass the chart one can use separately as needed please if I am not giving...
Here you have it.
1. Draw Candle Numbers.mq4
2. Draw Candle Times.mq4 - this one has option to make time print format full or simple.

Attachment 3768480
Draw Candle Times.mq4
Draw Candle Numbers.mq4

Motiram Oct 18, 2020 2:18pm | Post# 40440

{quote} Here you have it. 1. Draw Candle Numbers.mq4 2. Draw Candle Times.mq4 - this one has option to make time print format full or simple. {image} {file} {file}
BlueRain, so nice of you taking a time and building a new indicator as per my request and so quick I am very gratefully to you, I have a question can it is possible to limit the input for back bars in the both indicators please

I like the option to make time print format full or simple in the indicator "Draw Candle Times.mq4"

Kind Regards
Moti


© Forex Factory