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)

wcoutinho Oct 16, 2020 4:59pm | Post# 40381

2 Attachment(s)
{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;
Hi Jean, I tried to insert the code, but I couldn't, I left an image here illustrating the strategy I wanted, which apparently is very interesting for binary options, making a maximum of 5 martingales. As shown in the picture ....


1 SELL ----- 3 consecutive bullish candles, each of which is more than double the previous candle, and vice versa to buy. I'll leave the indicator below that already has an alert and arrows, and I thank you, friend, for having seen my post and helping me. God bless you.
Click to Enlarge

Name: FF JEANLOUIE.PNG
Size: 56 KB
candle-size-alert-mt4-indicator.mq4

BlueRain Oct 16, 2020 8:14pm | Post# 40382

2 Attachment(s)
Hello to all I need an indicator, which can "Plot High & Low Horizontal Lines on Any selected number of BackBar" and extend lines till current candle +1. And it must have the following options if possible... 1-indicator can be loaded multiple time. 2-indicator have option to plot lines on the any selected back bar. 3-can be changed the line colour, style, thickness etc. 4-show the number of the bar it is used. 5-refresh when new candle opens. 6-it could be MTF Please see the image attached for detailed. Regards Moti {image}
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)
Name:  draw hl line.JPG
Views: 1152
Size:  51 KB
Draw Candle High Low Lines.mq4

solorik Oct 16, 2020 8:40pm | Post# 40383

Hello Coders,
Can you please provide resources to learn MT4 indicators Programing except mql4.com please

Hbkkk Oct 16, 2020 9:56pm | Post# 40384

1 Attachment(s)
Hi BlueRain
Plz help me change indicator to ea
Buy at the end of the candle and the arrow is aqua
Sell at the end of the candle and the arrow is red
And finally, the training SL,TP, SL and lot number can be adjusted as needed
Have a nice day !
MA SIGNAL.mq4

haruteri Oct 16, 2020 10:45pm | Post# 40385

2 Attachment(s)
Repected coders,

Could you please make MTF to this indicator attached?

Thank you very much!
CCI Ob Os_arrows+alerts.ex4
CCI Ob Os_arrows+alerts.mq4

vuthg0106 Oct 16, 2020 11:04pm | Post# 40386

Hey Guys, i want to learn and improve my MQL4 skills. I think the best way to do this is to practice. Unfortunately sometimes I don`t have any nice idea which i can implement in a Expert Advisor / Indicator. So if any of you is interested, please post in this forum your ideas and i will try to implement it into mql4. Andi
I am trying to code a hedging tactic. It is as follows:
- I will order at TF H4
- First I will look for entry points.
If SMA5> SMA10> SMA50 => I will order with 2 orders at the same time
+ Order 1 (No1): OrderType 1 == Buy; OrderPrice1 == Ask; SL1 = 40 pips; TP1 = 20 pips; Orderlots1 = 1.
+ Second order (No2): OrderType2 == OP_SELLSTOP; OrderPrice2 == OrderPrice1- (SL / 2) * point; SL2 = OrderPrice1 + TP * point (OrderStopLoss2 = OrderTakeProfit1); TP2 = OrderPrice1-SL * point (OrderStopLoss1 = OrderTakeProfit2); Orderlots2 = 3.
- If No1 reaches TP1 but No has OrderType2 == OP_SELLSTOP (No2 is still in the form of pending order, has not been started as a market order) => Delete No2
- If No2 changed from pending order to market order, then immediately place No3.
+ OrderType3 == OP_BUYSTOP;
+ OrderPrice3 == OrderPrice1;
+ SL3 = OrderPrice1-SL * point (OrderStopLoss1 = OrderStopLoss3);
+ TP3 = OrderPrice1 + TP * point (OrderTakeProfit1 = OrderTakeProfit3)
+ Orderlots3 = 6.
At this point I am having a problem that before that I set the conditions to order on 1 candle to avoid ticking on multiple orders at the same time. When No2 turns into market order but H4 candlestick hasn't finished yet, this candle is No1 order candle so No3 should not be placed.
- If No2 reaches TP but No3 remains BUYSTOP => delete No3, close No1.
- If No3 from BUYSTOP changed to BUY, put next order No4
+ OrderType4 == OP_SELLSTOP;
+ OrderPrice4 == OrderPrice2;
+ SL4 = OrderStopLoss2 = OrderStopLoss4
+ TP4 = OrderTakeProfit2 = OrderTakeProfit4
+ Orderlots4 = 12.
Can you help me with this problem?
Thank you very much!

TrendLover Oct 16, 2020 11:13pm | Post# 40387

Hello Coders, Can you please provide resources to learn MT4 indicators Programing except mql4.com please
https://www.youtube.com/results?search_query=mql4
https://www.udemy.com/topic/mql/
https://expertadvisorbook.com/expert...-metatrader-4/

maahome Oct 17, 2020 1:18am | Post# 40388

1 Attachment(s)
Hi All,

Does anyone have the mql file for this indi or can someone put an alert into it if they have it - I would like it to alert on an event like when the wave numbers appear.

Thanks all
elliot-fibonacci-indicator.ex4

behnaam Oct 17, 2020 1:56am | Post# 40389

Hi,
I am looking for a simple indicator which shows the

a) Time frame=M30
b) sell entry when 24 bars consecutively having psar=>iOpen
c) buy entry when 24bars consecutively having psar=<iOpen
d) tp=50; sl=50;
e) one trade per time


Thanks in advance,

BitcoinBoff Oct 17, 2020 2:08am | Post# 40390

1 Attachment(s)
{quote} Added Alert .. Please note that it will alert only once a day at the open new candle time. Not tested.. so check it out if that doesn't work. {file}


Great indicator !

Could you PLEASE add a feature to see the indicator on previous days ?

It does not matter if it shows only on one previous day in the past, or more, as long as I can look at each day in recent history.

The easiest way for you to do this is fine.
0 - H-Lines Targets v1.0.mq4

cgninvesting Oct 17, 2020 2:35am | Post# 40391

1 Attachment(s)
Hi guys, I'd be in interested in automate this Heiken Ashi MTF strategy not sure if this have been done before but I'm looking for an EA able to do the following:

Buy entries
D1 above 200 ema
H1 above 20 ema
M15 open buy trade after 1st positive candle close
M15 Optional filter MACD above 0
M15 Optional filter CCI above 0

Sell entries
D1 below 200 ema
H1 below 20 ema
M15 open sell trade after 1st negative candle close
M15 Optional filter MACD below 0
M15 Optional filter CCI below 0

Stop loss ATR x2 Risk % per trade or fixed lot size. Trailing...
Hi guys,

I've found this usefull EA, maybe someone with mql4 skills could help me to implement the entry conditions describe above I've tried myself in an online website without success...

Thank you in advance I really appreciate all your help.

Best,
CGN
Candle Color EA.mq4

Pett Oct 17, 2020 3:43am | Post# 40392

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.

Inserted Code
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 = 1;
      double signal = MathAbs(iClose(symb,_per,i) - iClose(symb,_per,i+kper));
      double noise = 0;
      for (int j=0; j<kper; j++)
         noise += MathAbs(iClose(symb,_per,i+j) - iClose(symb,_per,i+j+1));
      if (noise > 0)
         er = signal / noise;
      double sc = MathPow((er * (kfast - kslow) + kslow), 2);
      KAMA[i] = KAMA[i+1] + sc * (iClose(symb,_per,i) - KAMA[i+1]);
      i--; 
      }
     
return(KAMA[shift]);

The problem is that I keep getting an array out of range error at KAMA[i+1] since the very first KAMA value is obviously beyond the array range. However calculating the current KAMA requires the inclusion of the previous KAMA value in the formula. I have tried calculating the values for all bars and getting a specific number into the array with no success. I have also tried counting up and counting down loops but no joy. The calculations work OK with a buffer in the start function but I am stumped when moving them to a function. Is there any way to work around this issue? Any insight is welcome with open arms

ardalan91 Oct 17, 2020 5:15am | Post# 40393

Hi

thank you all 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.

Aleksei711 Oct 17, 2020 5:36am | Post# 40394

1 Attachment(s)
{quote} Hi guys, I've found this usefull EA, maybe someone with mql4 skills could help me to implement the entry conditions describe above I've tried myself in an online website without success... Thank you in advance I really appreciate all your help. Best, CGN {file}
Hi guys, I've been using this handy Candle Color indicator for MT5. What it does is recolor candles at specified times. I typically trade the first and last candle of the pre-open, session open, and post-session-open hours, so I use this indicator to highlight those candles for easier identification.

Does anybody have this for MT4? I've attached a screenshot of how it looks, the Gold candlesticks are where the indicator has been applied
Click to Enlarge

Name: Screenshot1.png
Size: 29 KB

saadan Oct 17, 2020 5:57am | Post# 40395

Congratulation traders pg. 2020

Pett Oct 17, 2020 6:00am | Post# 40396

1 Attachment(s)
{quote} Hi guys, I've found this usefull EA, maybe someone with mql4 skills could help me to implement the entry conditions describe above I've tried myself in an online website without success... Thank you in advance I really appreciate all your help. Best, CGN {file}
Candle Color EA.mq4
CGN,
The attached EA has the mods you requested. Untested of course since it's a weekend. The original version flagged several warnings under strict compilation and I tried to correct most of them. A few remain pertaining to the return values of the OrderSelect, OrderModify and OrderClose functions so you may want to keep an eye out for those when testing the EA. Since the EA already has ATR stoploss functionality, I did not explore this request further. Also you did not specify which MACD line index you wanted for the filter so I included an input to select either Main or Signal line.
All the best.

cgninvesting Oct 17, 2020 6:38am | Post# 40397

{quote} {file} CGN, The attached EA has the mods you requested. Untested of course since it's a weekend. The original version flagged several warnings under strict compilation and I tried to correct most of them. A few remain pertaining to the return values of the OrderSelect, OrderModify and OrderClose functions so you may want to keep an eye out for those when testing the EA. Since the EA already has ATR stoploss functionality, I did not explore this request further. Also you did not specify which MACD line index you wanted for the filter so I...
Awesome Pett,

Thank you so much, would you be able to add the other filters? emas on the higher time frames?

Best,
CGN

Pett Oct 17, 2020 7:36am | Post# 40398

{quote} Awesome Pett, Thank you so much, would you be able to add the other filters? emas on the higher time frames? Best, CGN
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.

jeanlouie Oct 17, 2020 7:46am | Post# 40399

2 Attachment(s)
{quote} Hi Jean, I tried to insert the code, but I couldn't...
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.
Name:  Screenshot2.png
Views: 949
Size:  1 KBConsecutive_Candle_Ratio.mq4
Hello Coders, Can you please provide resources to learn MT4 indicators Programing except mql4.com please
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

cgninvesting Oct 17, 2020 7:54am | Post# 40400

{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.
Brilliant thanks!


© Forex Factory