How to code? - page 14

 

elihayun,

It makes sense & thanks a lot. I'll try to use MarketInfo() function.

 
 

Can someone please explain to me what these lines of code mean/do:

Can someone please explain what these lines of code mean/do? :

SetIndexDrawBegin(0,BandsPeriod+BandsShift);

SetIndexDrawBegin(1,BandsPeriod+BandsShift);

SetIndexDrawBegin(2,BandsPeriod+BandsShift);

SetIndexDrawBegin(3,BandsPeriod+BandsShift);

 
 

help with reading mql4 code for an indicator

I am trying to come up with a profitable strategy using this indicator--4 period ma. I used to trade live successfully using a similar indicator that I don't have access to anymore. I can't seem to find the optimal settings on 4pma i.e. ma length, method, etc.

Would anybody who can read MQL4 code be able to tell me how this indicator is constructed--how do you determine the hi and lo levels(they are the dynamic fibo levels), how do you determine the lcf and hcf levels? I understand the ma1, ma2, ma3 are moving averages, which lenght and method of calculation can be set by the user--ex. simple moving average, 13 period. It doesn't look like the default settings are optimal. That is why I am trying to understand how it works so that I can fix it.

The indicator is attached below.

Any help is appreciated.

Files:
4_period_ma.mq4  47 kb
 

Code Error?

Ive got an EA that doesnt seem to open Buy orders. Perhaps there is an error in the code????

//+------------------------------------------------------------------+

//| Open buy | |

//+------------------------------------------------------------------+

if (!ExistPositions()){

if ((Ask = Kijun&&PrCloseBandUp12 */ ))

/*Hi-Lo > LongBar*Point ex PRG

/* PrClose>BandUp4&& PrClose>LWMA &&LWMA>LWMA20 /*&&BandUp4>BandUp12 */

{

OpenBuy();

return(0);

}

Thanks in advance,

Efextrader

 

code to not paint the past...

Can someone fix this indicator so that it doesn't paint the past?

Thanks in advance!

Files:
 

You need to have a professional programmer handle this EA. I recommend Yaroslav at Forex-Experts.com.

Dave <<
 

very simple code (trailing stop) - need correction

suppressed - to basic - without interest - sorry

 

Code/script for compouding

Hello,

Does someone knows the/a code for compounding?

I'd like to test when it's the best time to compound (per how many trades or days).

Manually testing it is going to cost a lot of time I think (when you consider that I have some experts which make around a thousand trades per year)..

And I thought/hoped the code shouldn't be too difficult...

Thanks in advance,

Paulan van Nes

PS: I posted this also on another place, I don't know where it belongs..

(original topic: http://forum.mql4.com/3833)

Reason: