Ask! - page 158

 
Kalenzo:
Looks like you put magic number correctly. The only problem is that you are not checking IF the order with the same magic number exists in current trade pool. You should walk through all open orders and check if OrderMagicNumber() == Your magic number before entering new trade.

Thanks Kalenzo. But i m really not so unstd. Actually i m doing this thru the EA builder website, and now try to cut and paste some other feature inside my EA.

I been checked. no other trade. I start new account and test but only one trade executed, either long or short, they cant work independently >>> Cry Out Loud

When buy executed, i seeing jornal say that Sell is "context busy" then result no entry??

2 EAs with diffrent magic having crash???

Can u pls modify something in? I will use that as template for future reference.

Thanks a lot...

 

nedd help

i have problem with my ea i add rsx indicator

and i want it buy when rsx go over zero and sell under zero

if(UseRSX)

{

_i0 = iCustom(symbol, period, RSXIndicatorName, RSXLengh, RSXCountBars,JRSX_Up, 0, pos);

_i1 = iCustom(symbol, period, RSXIndicatorName, RSXLengh, RSXCountBars,JRSX_Down, 1, pos);

if(_i0 > _i1) _short = false;

if(_i0 < _i1) _long = false;

the problem with this script

it buy when rsx go over zero

but it buy another lot every candle

if on mt4 i am on 15 min charts it buy a new lot every 15 min

and same for sell signal

who can help me?

 

VoltyChannel_Stop_v2.1_TRO_MODIFIED_VERSION

Dear Codersguru,

Can you please help me adding alert & email to this indicator after candlestick completely form ?

Is there any EA based on this indicator?

Best Regards,

Ahmaddzaqy

 

Hi CodesGuru,

Can you please help in converting the attached indicator into and EA.

It gives signals based on EMA1 and EMA5 crossovers.

More to program: EMA80.

Buy when EMA1 crosses above EMA5 and EMA80 is moving upward, even a slight upward movement will suffice.

Close buy when EMA1crosses down EMA5

Sell when EMA1 crosses below EMA5 and EMA80 is moving downward.

Close Sell when EMA1 crosses above EMA5.

Any help would be greatly appreciated.

Thanks

Amit

Files:
 

5 Line Channel indicator

Can anyone lead me to a MT4 channel indicator with 5 lines and not just the 2 lines?

Thank you!

eagledpm

 

How do I display values on chart?

Hello,

I am hoping somebody could help me...

I have an EA which is running, I would like it to display some of its variable values on the chart, how do I do this?

I am sorry that this is probably a very easy question, I am reletively new to MQ4 coding, but used to be a C programmer many moons ago.

Thanks for your help.

 

This is how I do it in my RogueTrader:

Just change the variables to what ever your using and the rest should work fine.

string sComment = "";

string sp = "----------------------------------------\n";

string NL = "\n";

string sDirection = "";

sComment = eaname + NL;

sComment = sComment + "Stop Loss = " + DoubleToStr(Stoploss,0) + " | ";

sComment = sComment + "Take Profit = " + DoubleToStr(TakeProfit,0) + " | ";

sComment = sComment + "Main Trailing Stop = " + DoubleToStr(TrailingStop1,0) + NL;

sComment = sComment + sp;

sComment = sComment + "Lots = " + Lots + " | " + "Current Open Orders = " + ordTotal + NL;

sComment = sComment + "Max Orders = " + MaxOrders + NL;

sComment = sComment + "ADX Period = " +APeriod + " | " + " RVI Period = " + RPeriod + NL;

//sComment = sComment + "sig_sell=" + DoubleToStr(sig_sell,Digits) + NL;

sComment = sComment + sp;

Comment(sComment);

return (0);

I put the at the very bottom of the program

Hope this helps

- Mike

 

That works great...many thanks for that!

 
 

Trend Indicator

This is a great indicatorexcept it keeps changing the name on the up and down trend lines, can someone change this indicator to make the name fixed so it does not change the trend whenever the trend direction changes?

and has anyone though of making news indicator so we can add news events with time and currency pair in the code and each time there is a news we get a signal, then later use that signal to start or stop an EA ? please let me know if someone did that already ?

Regards,

Alan