Requests & Ideas, the beginning - page 54

 

Compiling of MQ4 indicators or EA's

I am endeavouring to make trading in the Forex market a future living but sad to say my losses exceeds possible winnings by the extreme. I have subscribed to this forum hoping to get some guidance . . .

When I download a MQ4 (and thanks to Linux user) want to compile it I get 156 errors? Irrespective of the Indicator downloaded. The only ones that worked was when both the MQ4 and the EX4 were combined together in a RAR or a Zip file.

The only analyses method that holds the key is Trend breakouts or Trend reversals. I know when they occur, I know how to read, interpret and trade them but lack the discipline and the patience to wait until they ready and ripe to initiate my trade.

What I really would like to have is some sort of signal to wait for and to act upon.

 

EA coding nightmare

It all started w/ these 2 indicators:

TrendStrength_v2.mq4

TrendEnvelopes_v2.mq4

I tried the EA listed under TrendStrenght and TrendEnvolpes EA's, but they didn't fit my trading style. So I set off to write on on my own.

I ran into the problem of the EA always getting the same values from the trendstrenght indicator all of the time. I wrote a 'blank ea' that puts the values up in a comment section. If you run a back-test, or even log the values out to a csv file, you'll see.

I'm attaching the 'blank ea' and indicators for reference (They've been posted here in the elite section before. But I can't find them or any updates to them). the blank EA uses the same EXACT calls (icustom) as in my regular EA.

Any help would be appreciated.

 
nondisclosure007:
It all started w/ these 2 indicators:

TrendStrength_v2.mq4

TrendEnvelopes_v2.mq4

I tried the EA listed under TrendStrenght and TrendEnvolpes EA's, but they didn't fit my trading style. So I set off to write on on my own.

Hi, I moved your post to here but I'm trying to understand what you want/need?

 
Drikkie:
I am endeavouring to make trading in the Forex market a future living but sad to say my losses exceeds possible winnings by the extreme. I have subscribed to this forum hoping to get some guidance . . .

When I download a MQ4 (and thanks to Linux user) want to compile it I get 156 errors? Irrespective of the Indicator downloaded. The only ones that worked was when both the MQ4 and the EX4 were combined together in a RAR or a Zip file.

The only analyses method that holds the key is Trend breakouts or Trend reversals. I know when they occur, I know how to read, interpret and trade them but lack the discipline and the patience to wait until they ready and ripe to initiate my trade.

What I really would like to have is some sort of signal to wait for and to act upon.

You have a problem. I can't tell you exactly what it's. Maybe the browser, the charmap or other program.

When you download an indicator the only one you can compile is the source code (mq4 extension, eg: hello.mq4).

ex4 extension does not need to be compiled, just drop this ones into your /experts/indicator folder.

Well, maybe your browser config or anything else is filling the file (the mq4 file) with " and that's your problem

Meanwhile you look and research for the problem origin you could take the file you want to compile and delete all ".

 

Thanks.

What's going on is that my EA is pulling the same values from the indicators listed on each candle. The vaules never change.

If you load the blank EA into a back test and put the indicators in your indicator folder, you'll see up in the upper left hand corner of the chart window. the values never change.

Does that help?

Linuxser:
Hi, I moved your post to here but I'm trying to understand what you want/need?
 
nondisclosure007:
Thanks.

What's going on is that my EA is pulling the same values from the indicators listed on each candle. The vaules never change.

If you load the blank EA into a back test and put the indicators in your indicator folder, you'll see up in the upper left hand corner of the chart window. the values never change.

Does that help?

Maybe you have a problem with the buffers. Let me see the buffers code.

 

Thank you oh so very much for your help.

I take it you got the same results as I did when you loaded up the blank EA w/ the 2 indicators.

Let me know what you find.

And again, thanks!

Ps. the code is in post number 534 (on this page).

Linuxser:
Maybe you have a problem with the buffers. Let me see the buffers code.
 

linuxuser,

thanks. I figured out what was going on. I wasn't setting the timeframe in my custom call indicator to 0 (current tf) i had it around a month.

thanks anyways.

nondisclosure007:
Thank you oh so very much for your help.

I take it you got the same results as I did when you loaded up the blank EA w/ the 2 indicators.

Let me know what you find.

And again, thanks!

Ps. the code is in post number 534 (on this page).
 

calculating a stoploss

et al,

Here's what I'm looking for:

What I want to be able to do is set a lot value to open up an order and set the stop loss based on how much I'm willing to lose.

So, lets say I want to risk 1% per trade, I would use this formula to figure out the lot value (Risk in a whole number insteal of x.xx):

lot=NormalizeDouble((AccountFreeMargin()*(Risk/100))*AccountLeverage()/MarketInfo(Symbol(),MODE_LOTSIZE),2)[/CODE] (probably replace the '2' with [CODE]marketinfo(Symbol(),mode_lotstep)

But what I'm trying to figure out is where to set the stop loss (in pips) so that I can say I am willing to lose, say 5% of equity (or account free margin). And set the stop loss equal to that 5%.

Can anyone help me figure this out?

Thanks in advance!

 

Hi all,

Sorry 4 my english :P

How do you look this?

pipvalue=MarketInfo(Symbol(),MODE_TICKVALUE);

if(SellPrice>=10){

multiplique=100;

}else{

multiplique = 10000;

}

double riskp=(sl-SellPrice)*multiplique;

double riskm= riskp*pipvalue;

mylots = (Risk * AccountEquity() ) / riskm;

(and opositive for buy)

Reason: