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:09am | Post# 40401

{quote} CGN, I coded the EMA and M15 filters into the EA (lines 148 to 212). I did not include them in the inputs since you already specified their respective parameters.
Hi Pett,

Sorry to bother you again, thinking on doing a better backtesting on different TF, would be possible to add the following parameters to the inputs tab?

- MACD on current TF "true or false"
- CCI on current TF "true or false"
- EMA 20 be able to choose the time frame
- EMA 200 be able to choose the time frame

Also I'd like add if possible one extra condition for entries

- Entry candle must be same color than the highest TF.

Thank you so much Pett!

Best,
CGN

Pett Oct 17, 2020 10:50am | Post# 40402

3 Attachment(s)
{quote} MACD on current TF "true or false" - CCI on current TF "true or false" - EMA 20 be able to choose the time frame - EMA 200 be able to choose the time frame
CGN,
These options are already available in the EA I uploaded. You can choose your preferred time frame from the drop down menu.
Click to Enlarge

Name: MACD.png
Size: 9 KBThis applies to the MACD, CCI and now the 200 and 20 EMAs (file attached.

{quote} Also I'd like add if possible one extra condition for entries - Entry candle must be same color than the highest TF.
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.
Click to Enlarge

Name: code.png
Size: 23 KBIf 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 time frame then also go on and change "MN1" to your preferred time frame (D1, W1, H4 etc) after uncommenting. This way you will have a feel and deeper understanding of the code you are working with and ultimately be in a position to modify it to suit your needs.
Good luck!
Candle Color EA.mq4

djorshuar Oct 17, 2020 11:37am | Post# 40403

1 Attachment(s)
I need a coder to help me code this indicator below in a way that it only displays from left of the mt4 chart to the current time in price and not extend to the far right hand side of the mt4 chart. Thanks
ICT 80_20.mq4

solorik Oct 17, 2020 1:14pm | Post# 40404

{quote} What have you got so far? double cur_body_size = MathAbs(Close[i]-Open[i]); double prev_body_size = MathAbs(Close[i+1]-Open[i+1]); double cur_to_prev_ratio = cur_body_size / prev_body_size; bool is_2x_bigger; if(cur_to_prev_ratio >=2)is_2x_bigger=true;
hello
in the previos code why it's Close and not iClose ?!

wcoutinho Oct 17, 2020 1:46pm | Post# 40405

1 Attachment(s)
{quote} Couldn't see what you tried. You can have this, source attached so you can look inside. Variable sequence length and mininmum ratio, applies to consecutive candle types. {image}{file} {quote} Sources, in no particular order; - other people's code - code examples on mql4/5 - mql4/5 docs - googling and wading through results to find the one sentence that answers your issue
hello Jean, yes the function is exactly that, however, I noticed that few signs are appearing, so I went to analyze the graph and saw this. Example in this image has these 2 entries where the arrow did not appear. I believe that the reason is the GAP of the candle. I already thank you for everything, for your time and willingness.
Click to Enlarge

Name: CONSECTIVE CANDLE RATIO.PNG
Size: 97 KB

jeanlouie Oct 17, 2020 2:06pm | Post# 40406

2 Attachment(s)
{quote} hello in the previos code why it's Close and not iClose ?!
Well why not? Consider what they're for, if you're after the close value of some bar on the current chart, why use iClose(chart symbol, chart period, location) when you can use Close[location].

{quote} ... yes the function is exactly that, however, ...saw this. Example in this image has these 2 entries where the arrow did not appear. I believe that the reason is the GAP of the candle...
Include settings used, a gap between candles shouldn't matter to measuing candle bodies.
Name:  Screenshot1.png
Views: 948
Size:  < 1 KBName:  Screenshot2.png
Views: 950
Size:  < 1 KB

Motiram Oct 17, 2020 2:14pm | Post# 40407

1 Attachment(s)
{quote} Here you have it - based on some other similar ones. Candle index is starting from 1 so if you put 5, it will draw at 5th candle including current bar. ( starting from right most candle) {image} {file}
Superb! BlueRain, thank you very much for building an indicator as request I am so grateful to you for your assistance.

I have attached the image in which the some of candle numbers are hiding behind the candle is it due to market is off or please can you take a look.

Have a great weekend

Kind Regards,
Moti
Click to Enlarge

Name: EURUSDM30-Draw Candle High Low Lines.png
Size: 36 KB

BlueRain Oct 17, 2020 2:24pm | Post# 40408

1 Attachment(s)
{quote} Superb! BlueRain, thank you very much for building an indicator as request I am so grateful to you for your assistance. I have attached the image in which the some of candle numbers are hiding behind the candle is it due to market is off or please can you take a look. Have a great weekend Kind Regards, Moti {image}
Ok. I fixed and added extra space. Let me know still problem.
Draw Candle High Low Lines.mq4

Motiram Oct 17, 2020 2:40pm | Post# 40409

1 Attachment(s)
{quote} Ok. I fixed and added extra space. Let me know still problem. {file}
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
Click to Enlarge

Name: EURUSDM30-Draw Candle High Low Lines1.png
Size: 36 KB

MyProfit Oct 17, 2020 2:42pm | Post# 40410

2 Attachment(s)
Please, somebody to remove the "extra" line in this indicator.. green arrow,,,

Thanks
Click to Enlarge

Name: habff.png
Size: 17 KBn4_tf_has_bar4.mq4

BlueRain Oct 17, 2020 2:59pm | Post# 40411

1 Attachment(s)
Please, somebody to remove the "extra" line in this indicator.. green arrow,,, Thanks {image}{file}
Fixed.
n4_tf_has_bar4.mq4

UKBanter Oct 17, 2020 3:20pm | Post# 40412

All the best fellas I coded my question myself.

vinscal Oct 17, 2020 3:26pm | Post# 40413

Hi Bluerain Can you please help me in adding an feature of supertrend (atrperiod and multiplier changeable ) crossover in this attached vwap indicator with a big arrow &crossoverlabel with alert. supertrend crosses vwapdaily {image} Thanks {file} {file}
Hi Bluerain

can you please help on this request vwap supertrend crossover

Pett Oct 17, 2020 3:57pm | Post# 40414

{quote} Ok. I fixed and added extra space. Let me know still problem. {file}
Hello BlueRain,

Any chance you have a moment to look at function I am having trouble with?

https://www.forexfactory.com/thread/...2#post13218732

I will really appreciate any assistance or insight you can provide even if its just a rough idea for a work around.

Thanks.

pressium Oct 17, 2020 4:00pm | Post# 40415

{quote} I posted my strategy in the post below but here is an addition to make trading easier. I especially like the reverse option. https://www.forexfactory.com/thread/...9#post13208039 {file} {image}

Thanks Hutch!!!

MyProfit Oct 17, 2020 4:10pm | Post# 40416

{quote} Fixed. {file}
Thank You.. Sir

Michael20201 Oct 17, 2020 5:59pm | Post# 40417

1 Attachment(s)
Can anyone code my Brilliant reversal ex4 to Mt5
1 Brilliant Reversals (2).ex4

FX.PipEngine Oct 17, 2020 6:50pm | Post# 40418

1 Attachment(s)
if you can use the rules in this excel to create an EA please message me
Naldo Rules.xlsx

afsarfx Oct 17, 2020 8:32pm | Post# 40419

2 Attachment(s)
please can any one make this indicator 4 time frame bar
in snakeforse remove 2 and 3 colour keep only 0 and 1
snakeforce.mq4
Solar Wind.mq4

BlueRain Oct 17, 2020 9:02pm | Post# 40420

Hello all, I am trying to patch up a function for calculating the Kaufman's Adaptive Moving Average (KAMA). The goal is to get the value of KAMA for any symbol at any period based on a variable shift. double Kama(string symb, int _per, int kper, int kfast, int kslow, int shift) { //---- int arraySize = kper * kslow; double KAMA[]; ArrayResize(KAMA, arraySize); ArraySetAsSeries(KAMA,true); int counted_bars=IndicatorCounted(); int i = Bars - counted_bars; double fastest = 2 / (kfast + 1); double slowest = 2 / (kslow + 1); while(i>=0){ double er =...
Just quick looking, you are setting arraysize to
ArraySize = kper * kslow;

Can you be sure that it has enough array size for whatever shift / index you are passing?

There are number of possible solutions:

1. Loop is Limited to smaller numbers
like
int limit = Bars - counted_bars;

if (limit > 500) limit = 500;


2. Set array size to fixed size of known.. like ArraySize(MAFA,


it might be better to set to a large array size like 10,000 or use total loop size as ArraySize(KAMA, Bars - counted_bars)

..

Key point is :
1. Make loop quick - limit the size of loop
2. Make array small enough to hold data but make sure it has enough size so it doesn't produce out of range.

You may want to add some kind of print to debug the progress and see where your bug sits.


© Forex Factory