Coding help - page 396

 
apprentice coder:
mladen any suggestions for most efficient dll using microsoft visual studio?

I think that this : Walkthrough: Creating and Using a Dynamic Link Library (C++) is a very good starting point to get as much information as it is possible about that matter. MSDN is really a place when one can find almost everything regarding serious coding

 

Yet another desperate plea!

Hi Mladen. I wonder if you could work the same miracle with this as you did with the smaller version. I need it altered to be the same as the 5 Ducks E v01 you did a few days ago. It will be a lot faster than placing the smaller version on all my selected pairs. I need the M5 & M15 time frames added.

Files:
3ducks.mq4  33 kb
 
mladen:
I think that this : Walkthrough: Creating and Using a Dynamic Link Library (C++) is a very good starting point to get as much information as it is possible about that matter. MSDN is really a place when one can find almost everything regarding serious coding

Thanks for the link

 

Hi Mladen,

thank you very much for your help!

My EA is working now

Could you please make a recommendation about how to filter sideway / ranging markets? I was planning to implement CCI or RSI filter. Maybe a second HMA indicator with longer time frame? Probably there is a better oscillator for filtering available? What do you think?

Thank you in advance!

mladen:
tfi_markets Try to move both break statements one line up (to be within the "}" )
Files:
ea_working.jpg  63 kb
 
tfi_markets:
Hi Mladen,

thank you very much for your help!

My EA is working now

Could you please make a recommendation about how to filter sideway / ranging markets? I was planning to implement CCI or RSI filter. Maybe a second HMA indicator with longer time frame? Probably there is a better oscillator for filtering available? What do you think?

Thank you in advance!

If you are going to use RSI use short periods (every serious study of RSI recommends that RSI should not use long periods - since the longer the rsi period the flatter the rsi is)

CCI does not have that problem and if you use, for example, values between levels -100 to 100 as ranging levels, it will probably help

 

Good morning.

May I ask if I could report all indicators in this graph, to launch a template with all of them.

Thank you very much and thank you for your interest.

Files:
 

Hi guys, one question just to be sure if this is correct. I'd like the EA to fix the lot size so that if it reaches the stop loss, it will lose only a define percentage of the free margin. Am I correct with this :

lot = NormalizeDouble(StopLoss * AccountFreeMargin() * Risk * AccountLeverage() / MarketInfo(s_symbol,MODE_LOTSIZE),2);

with StopLoss = the StopLoss in pips (100 for example) and Risk the percentage in decimal (0.05 for example).

Thanks a lot.

 
airquest:
Hi guys, one question just to be sure if this is correct. I'd like the EA to fix the lot size so that if it reaches the stop loss, it will lose only a define percentage of the free margin. Am I correct with this :
lot = NormalizeDouble(StopLoss * AccountFreeMargin() * Risk * AccountLeverage() / MarketInfo(s_symbol,MODE_LOTSIZE),2);

with StopLoss = the StopLoss in pips (100 for example) and Risk the percentage in decimal (0.05 for example).

Thanks a lot.

Check this one (it is made like indicator, but it can easily be made as a function that will calculate what you need from whatever code) : lot_size.mq4

Files:
lot_size.mq4  2 kb
 

Try to programmatically find a formation with two growing highs and lows.

MIN 1 and MAX 2 easy to find.

MAX1 and MIN 2 tried to find using the ZigZag. Not a good identification.

Advise how best to programmatically determine "MAX 1 and MIN 2".

Files:
2016.jpg  111 kb
 

You need to put the arrow on the indicator, after the reduction from the maximum to the value "Rmax". Arrow need at maximum indicator.abc.mq4

Files:
abc.mq4  3 kb
signal.jpg  82 kb