Please fix this indicator or EA - page 31

 

Convert Script to EA (or make a script re-open after terminal is restarted)

Hi, I have a script that I would like to have it working as an expert advisor.

Imagine that I have a script that closes orders when a certain profit is reached, I want to have an expert advisor to run this script all the time, even if I shutdown and Re-open my terminal.

Scripts do not re-open themselves after we shutdown the terminal, but expert advisor do re-open.

What's the best approach to this?

How can I adapt the mql script code to an expert advisor, the script has the basic init, deinit and start functions.

Is there any alternate way to do this? Can I have a script being called again when my terminal is restarted without the need to re-code the script again as an EA?

Thank you for your help.

 

Thanks for your input.

Hi pipmaker,

I agree with you on the overbought/oversold use of the RSI. As a matter of fact, after 2 years of testing, I haven't found any use for any overbought/oversold indicator. I don't watch for the RSI to cross above or below any particular level. I use the MTF RSI as a filter on smaller time frames as an indication of where the pressure has been in the previous n periods. Then I watch price action for any clue as to whether or not price has the momentum to keep moving in the same direction. In other words, if MTF RSI set to 1440 periods (Day) is higher than the previous day (i.e. makes a "step up"), then I will know to look for a retracement in the opposite direction if it appears to be a ranging market and/or volume is decreasing. If I see any weakness or inability for price to make convincing new highs (or lows if the RSI has decreased) then I would be confident in the probability of a profitable short (or long) position. So I don't actually use the RSI as an overbought/oversold indicator in the traditional sense, but your comments make perfect sense. Taking positions solely based on using the RSI this way would probably lead to a breakeven equity curve, and in the long run would no doubt destroy an account unless the market ranged for an extended period of time.

The reason i need simplified color bars is because sometimes the movement is so slight, e.g. the RSI increases from 55.3 to 55.5, that I can't tell the difference just by looking at it.

In summary, I've found all overbought/oversold indicators to be ineffective and financially destructive. Some may be better than others, but I haven't found one that I can use confidently. I believe that the key in using indicators is to use them as filters rather than signals, offering a heads-up of what may happen, and then being patient enough to wait until price action confirms it. I'm anticipating that this MTF RSI may provide a good filter for this type of approach.

I'll definitely check out your profile for the links and check out the indicators. I like pretty colors.

Besticles,

Nyarlathotep

 

Help with EA trade function

Hi guys, Just started reading codeguru's PDFs and am really enjoying them. I used to Program in BASIC on a TRS80 back in the day but have not do any since. So Im catching on quickly.

Well I have an EA that I really like but it has this tendency to place many trades at points of support and resistance as price bounces off of them several times. if price Breaks through its a good thing but if price is rejected it leads to some nasty draw downs. What I would like to add to the trade open function is a filter that will not allow a trade to open if X number of trades are open within Y pips of Spot price. I know how to add the external inputs but am unsure if there is a function that will compare the current price with the price of open trades.

IOW

If Open trades =x then compare

If (current price) within or =Y pips of another open trade of same type (buy trade for buy trade and vice versa) Then no trade else open ticket.

I believe it would be best placed at the beginning of the trade execution loop posted below

int TradeSignalOpenOrder()

{

if (UseMAControl == True)

{

MAGator();

if (!MAGator()) return(0);

}

else

{if (!IsGatorActiveUp()) return (0);}

if (UseFilterB)

{if (filterBOBuy() || filterBOSell()) return (0);}

if (UseFilterC == True) filterC();

else

{

filterCLong = True;

filterCShort = True;

}

if (IsFractalLower() && filterAHigh() && filterCLong)

{

return(1);

}

if (IsFractalUpper() && filterALow() && filterCShort)

{

return(-1);

}

return (0);

}

I think this is where it decides to open the order. Thanks in advance as I'm a total noob at MQL4. I'll keep reading and try to figure it out too but thought would ask here. It could even be simplified to just checking if current price is within Y pips of any open trade (x =1)then no trade without checking for any other open trades but I would like to allow x number of trades open within Y pips for testing purposes.

 

Can anyone help with a Gator oscillator whipsaw filter

HI,

Im new to systems trading, ive traded manually for some time now. im trying to use a gator oscillator as a way to filter out wihpsaw/ranging markets. i want to code it so that it BUYs when gator is above 0.00060 Level and SELL when gator is below the -0.00060 Level.

can any one help out? with this?

Files:
gatorocs.png  47 kb
 

[langtitle=ru]kama signal[/langtitle]

[lang=ru]hi, could you insert a signal by changing color?

thanks[/lang]

Files:
kama.mq4  7 kb
 

Please help me add code to this EA!!!

2 everyone, now i have a simple martingle EA, and i see it very potential, some people have a live account with this EA, and it takes profit. You know that sometime the market just go 1 trend without retracement, so the account can't stand.

I want to improve is that it can add a hedging order if it go against the trend, then i will add my money later, and the volume will be the sum of last order.

The hedging order will be opened when the margin level is about 200% (for example). All this parameter can be set by hands.

So can anyone add this code to this EA, thanks a lot.

And i also want to here ur opinion to improve this EA, i truthly appreciated.

Files:
 

[langtitle=pt]EA nao funciona[/langtitle]

[lang=pt]alguem pode ajudar

tenho uma EA que em back test faz 300.000.000 usd, mas nao consigo que funcione

alguem me pode ajudar , por favor[/lang]

 
zaratrau:
[lang=pt]alguem pode ajudar

tenho uma EA que em back test faz 300.000.000 usd, mas nao consigo que funcione

alguem me pode ajudar , por favor[/lang]

Fix it to make 300,000,000 dollars with real money? easy!

(joking)

To say seriously - post your EA here and someone will look at it.

 

After forward testing this expert advisor for a couple months now, I have come to the conclusion that it is one with great potential - close to perfect.

According to the developer of this system, Darkonix, there are a few rules to follow determining the entry and exits of the system. It is a very profitable system if you have the time to trade it in the proper time zone. Since I am in the Pacific time zone, I'm not able to adhere to one of the rules of the system and must use the expert advisor in order to execute the trades properly. Unpon using the ea, I found that it entered the trades at times I wouldn't have manually done. This is where some of the exit rules Darkonix came up with aren't in the ea. This is where I think the expert advisor can be improved upon.

How to use it:

Go Short :

When NonLagMA send the signal for changing the direction to down trend (red color) and SSL is red (on 4h time frame will act as filter)

Go Long :

The opposite from short (everything should be green)

Trading rules

1. Follow the signals received only in between 6h00 GMT - 21h00GMT

2. Option "AlertAfterBarClose" in SSL fast sBar should be "true"!

3. Never trade against SSL fast sBar indicator color!

4. For exits use following choice's:

-StepStopExpert EA

-manually set TP60 and SL30

-IN10NTION news reader TdFibo lines

-NonLagMA color change

I think if someone added the feature for the expert advisor to open on the nonlagma color change in line with the ssl and have the option to close all trades once the NonLagMa changes color, this would be a great ea.

The reason I suggest this is two fold. One, this allows the absolute capture of a big move. Two, it will close out trades where the ea has entered at times when the market then moves in the opposite direction before the ea reaches break even, thus preventing the SL from being hit.

That's my two cents on the ea. For some reason I think this may improve the ea's profitability greatly, by limiting losses, and letting the winners run.

 

lol @ Newdigital and the 300 mill

Hey Newy are you able to help me with some coding?

I have the zerolagstochastic and wish to join all bottom stationary points together with straight lines. I want to do the same for the upper stationary points to join them together for the blue line not the red.

If any can do it or have any idea how to do this let me know and drop me a private message or I can post the indicator here for you.

Thanks

TB

Reason: