Coding help - page 339

 

thv3_rsi_v2.mq4

Hi there!

Just starting out creating EA's and wanted to know how I could include this indicator so I could open a trade when oversold or overbought... Any ideas?

Thanks

Files:
thv3_rsi_v2.mq4  11 kb
 
Jason2005:
thv3_rsi_v2.mq4

Hi there!

Just starting out creating EA's and wanted to know how I could include this indicator so I could open a trade when oversold or overbought... Any ideas?

Thanks

Jason2005

You have that conditions in the indicator itself already

These lines :

if (alertsOn)

{

if (RSIBuffer[0]>overBought && RSIBuffer[1]<overBought) doAlert(overBought+" line crossed up");

if (RSIBuffer[0]overSold) doAlert(overBought+" line crossed down");

}[/PHP]

You can use something like tihis :

[PHP] if (iCustom(NULL,0,"THV3 RSI_v2",....,0,1)>overBought && iCustom(NULL,0,"THV3 RSI_v2",....,0,2)<overBought) overbought condition code;

if (iCustom(NULL,0,"THV3 RSI_v2",....,0,1)overSold) oversold condition code);

 
mladen:
Jason2005

You have that conditions in the indicator itself already

These lines :

if (alertsOn)

{

if (RSIBuffer[0]>overBought && RSIBuffer[1]<overBought) doAlert(overBought+" line crossed up");

if (RSIBuffer[0]overSold) doAlert(overBought+" line crossed down");

}[/PHP]

You can use something like tihis :

[PHP] if (iCustom(NULL,0,"THV3 RSI_v2",....,0,1)>overBought && iCustom(NULL,0,"THV3 RSI_v2",....,0,2)<overBought) overbought condition code;

if (iCustom(NULL,0,"THV3 RSI_v2",....,0,1)overSold) oversold condition code);

Thank you so much for that! All done!

 

ea-compasstrading.mq4hi There, hope you are fine,

i need help fixing following problem i have, i want to make

- maximum open buy orders

- maximum open sell orders in my ea

i dont know why it uses only one of this 2 parameters and not both? i want both in one EA

thanks

Files:
 
mladen:
alpha24

I fail to understand your post

I did explain to you how you can simply get what you need. What is the problem then? You do not like the solution (that is, btw, exactly what you have described and as simple as it gets)? I simply can not see what could be the problem when your post was answered with a correct solution

regards

Sir,

I want to apply BB band of 1.5 deviation on 20 EMA your solution can not be applied, MT4 provides BB in round numbers.

 
alpha24:
Sir, I want to apply BB band of 1.5 deviation on 20 EMA your solution can not be applied, MT4 provides BB in round numbers.

You can use the one from this post : https://www.mql5.com/en/forum/184363or the one from this post : https://www.mql5.com/en/forum/184363 or as a third solution the one from this post https://www.mql5.com/en/forum/184363/page2 All you have to change in the code is line 8, from

#property indicator_chart_window

to

#property indicator_separate_window

and you will be able to apply any multiplier to deviations

 

hi mladen,

I have a big request to You... could you check please what's wrong with indicator attached below? the problem is that when signal appears only blue or red arrow is being drawn on the chart - the name of the pattern (MS, HM, BH, etc.) doesn't appear and I have to switch between different timeframes to fix that... looks like there is a problem with refreshing... could you fix that please? I will be very thankful :-)

Files:
indipattern.mq4  355 kb
 
freakout:
hi mladen, I have a big request to You... could you check please what's wrong with indicator attached below? the problem is that when signal appears only blue or red arrow is being drawn on the chart - the name of the pattern (MS, HM, BH, etc.) doesn't appear and I have to switch between different timeframes to fix that... looks like there is a problem with refreshing... could you fix that please? I will be very thankful :-)

Do you happen to have the original (non-decompiled) source code?

 

Hello,

Could someone please take a look at this indicator, it doesn't work like it should, very strange it sometimes works in one MT4 and in the other it makes the MT4 freeze ...

Files:
 
Wulong10:
Hello, Could someone please take a look at this indicator, it doesn't work like it should, very strange it sometimes works in one MT4 and in the other it makes the MT4 freeze ...

Wulong10

Try out this one : givonly_snr_snd_1.mq4

It does not freeze my terminals

Files:
Reason: