PDA

View Full Version : 4HR 5EMA Expert Advisor



pardooxcho
10-22-2008, 05:12 PM
1 Attachment(s) ** Current Version 1.6 **
This EA is based upon the principles in the 4HR5EMASystem post loed at https://www.cliqforex.com/general-forex-discussion/2792-safe-today-trade.html

This EA is still in the works so please feel free to state what you think could make the EA work easier.

Things I do not want to do.Insert more Indiors Or what

Should you find a problem with the EA please post a snapshot with a description of what is happening or what should be happening. Thanks

Settings
Please do this EA over the 4HR time period and if backtesting with enough data to offer valid entry and exit points to the machine.

CloseOrder - set to false when trading but in theory should beable to put this to true during live trading to close all open trades for shutdown. Not tested.

Lots - Lots dimensions

** Removed MaxRisk - Max Risk per transaction ex. 0.02 only use 2% of account for purchase of lots.

PipsPastSignal - Pips beyond the signal Low or High to Initiate Reversal Bar Trade.

PipsPastSL - Pips beyond the Signal Bar for Buy/SellStop and the SL for this order.

PipsPastEMA - Pips beyond the EMA for a valid Signal Bar

EMAPeriod - The Period to your EMA

MAGICNUMBER - the Exceptional number for the orders of this EA
https://www.cliqforex.com/trading-system-and-egies/2790-profitable-bank-trading-system.html

pardooxcho
10-07-2022, 09:29 PM
I have been recieving feedback that the principles aren't being follow? If you become aware of this could you please post a photo with a description of the principle not followed. Please help make this EA profitable.

Thanks.

oxrtacaoxra1
10-07-2022, 10:51 PM
Hi!

Is your EA works on M1 Timeframe? I think testing low TF is your testing method that is fastest.

Regrettably your EA is lacking a lot of buying and selling opportunities; following testing period I'll send You screenshots.

Than You

pardooxcho
10-08-2022, 12:13 AM
Oh sorry about that it ought to run on the 4 hr timeframe. With each tick.

oxrtacaoxra1
10-08-2022, 01:35 AM
Hi!

This is actually the first bizarre trade.

I think the first bar is a set up pub. The next is a reversal one. The setup pubs is 1,5473 so it's a buy at 1,5473 but the ea is not buying at this point. The ea purchased at 1,5554 (sell stop at 1,5197). I dont know it.
The third bar is a set up pub again, ist high is 1,5703, the 5ema high is 1,5688. The following one is a reversal bar. It must be a brief here but nothing occurs.


Thank You
https://www.cliqforex.com/attachments/15193655132111974671.png

oxrtacaoxra1
10-08-2022, 02:58 AM
Hi!

That is a lost commerce opportunity: the very first bar is a set up pub and the next is a reversal but no transaction.

Thanks
https://www.cliqforex.com/attachments/15193655162050205317.png

pardooxcho
10-08-2022, 04:20 AM
1 Attachment(s) @ Sheenka,
Thank you for your help I believe this fix will correct alot of issues.

Hi!

That is a lost trade opportunity: the first bar is a setup bar and the second is a reversal but no transaction.

Thanks I think I found out what's going wrong here. My charts utilize and extra digit in the end so rather than getting 0.5317 I'd have 0.53178. I've altered the code. In case you've got an extra digit like me or 5 digits you can just add a zero instead of 5 it could be 50 for the pips.
https://www.cliqforex.com/trading-system-and-egies/2810-perspolis-signals.html

pardooxcho
10-08-2022, 05:42 AM
Backtesting this variant shows promise since it does not have any cash management built in besides the risk management that seems to do more damage than good because of this particular system as is.

I'd like to get some input to get a cash management system that might help make this EA profitable.

I purpose that we utilize a lot higher than 0.1 therefore we can close half the order at a specific amount profit. This will raise the drawdown but will provide overall superior performance I think.

If anyone else has any ideas feel free to share.
https://www.cliqforex.com/attachments/15193655201448910988.png
https://www.cliqforex.com/general-forex-discussion/2800-currency-pairs-affect.html

rfornexxs22traderhopkxil.es
10-08-2022, 07:04 AM
Hello,

I do not examine EA for now, but take a look at source - it looks good - and have some remarks.

1. It looks you don't apply additional rules from post 1 4H5EMA thread (1 to 3).

2. Back in CheckForOpen() You compute both ema every tick - it is not essential, it is enough to compute it once for 4H in something like his


if (Time[0]! =dtBarTime)
dtBarTime=Timing [0];
emaHigh = iMA(NULL,0,EMAPeriod,0,MODE_EMA,PRICE_HIGH,1);
emaLow = iMA(NULL,0,EMAPeriod,0,MODE_EMA,PRICE_LOW,1);


dtBarTime ought to be datetime and emaHigh and emaLow ought to be global var in this circumstance.

If you utilize just one EA it isn't problem but should you use many of it it's important to maximize terminal usage - it ought to be quicker in backtests too.

3. You make commerce with market orders (except rev trade) it is ok but in fast market eg news, it could generate large slippage (terminal do not react as fast as brokers servers). It isn't big problem but one ought to recall this especialy when testing system (sterling use stop orders). Using Stop orders could be little more complied.

Unfortunately I'm very busy now but hope I will find some time to test this EA maybe tomorow.

I enjoy this egy and your job.

Regards,

Andrew

P.S. Sorry for english, it isn't my primary language.

gandano02
10-08-2022, 08:27 AM
Does it take some history until it gets a face and the material in the left disappears. . I have checked let reside trading etc.. .

pardooxcho
10-08-2022, 09:49 AM
does it require some history until it will get a smiley face and the message at the upper left disappears. . I have checked let live trading etc.. . Yes it requires only five bars of history so that it's enough for the 5EMAs. Are you getting Trade or Not enough History not allowed in the upper left corner?

If you see over five bars on the chart you shouldn't be getting that error? If you are then the problem might be with metatrader4. You might try removing the code
Inserted Code if(Barslt;5 || IsTradeAllowed()==false) Comment(Not enough History or Trade not permitted ); return in the bottom at the MT4 editor.

pardooxcho
10-08-2022, 11:11 AM
does it require some history before it gets a smiley face and the material in the top left disappears. . I've checked let live trading etc.. . I also only realized If your broker isn't letting trading it'll display that message too. For instance if it is after hours.

suboxrintt-71
10-08-2022, 12:34 PM
Thanks to Creating an EA. However, I have don't have any question concerning the spread and wondering if it would be better to use (Ask-Bid) instead of a fixed propagate?

gandano02
10-08-2022, 01:56 PM
Maxss280 thanks

I only have to give it a couple more bars for Mr. Smiley to smile.

lauravzquz
10-08-2022, 03:18 PM
I applied your EA's backup on friday and by morning it's developed a 700 USD to 2,500 USD it put orders on G/Y, E/J and G/U totalling to 2,500 USD.

But I discovered that it couldn't close the prior positions when other new signal came.

But because I've applied the altered one i.e. v5 it's not put a single order because yesterday.

Pls test and lets understand how far.

I cant wait to find that this EA become profitable on real acct.

Maxss280 nicely done, I appreciate your attempt.

pardooxcho
10-08-2022, 04:40 PM
1 Attachment(s)
Thank You for making an EA. However, I have do have a question about the spread and wondering if it would be safer to use (Ask-Bid) instead of a fixed spread? Changes V1.6I have altered the spread to used the Ask-Bid which is the disperse price. Removed the Risk Management Feature (Normally caused more harm than good) Additional Spread to the HUD Thank you for the suggestion BullRun I think this will help on a live account.
https://www.cliqforex.com/general-forex-discussion/2792-safe-today-trade.html

pardooxcho
10-08-2022, 06:03 PM
@ Andrew
Thank you for your remarks and I really do think you have some valid points.

Reply
1. I didn't notice he was adding some lol I will attempt to include those rules shortly.

2. Yeah I discovered that was an ineffective bit of code that I did not wish to add another work around since I did not know how to code it. I shall use the code with the Time[0] that I was shown by you. Thank you for you help still studying MT4 language

3. Yeah converting the Market Orders over to Pending orders may require a little thought as not to break the logic. When I first wrote this logic was different and the Market order is something that stuck around but it does need to be changed into a Pending order because you specified.

Thanks


Hello,

I don't examine EA for the time being, however, take a look at source - it looks great - and have any remarks.

1. It seems you don't apply additional rules from article 1 4H5EMA thread (1 to 3).

2. Back in CheckForOpen() You compute both ema every tick - it isn't essential, it is sufficient to compute it once for 4H in something such as his


if (Time[0]! ) =dtBarTime)
dtBarTime=Timing [0];
emaHigh = iMA(NULL,0,EMAPeriod,0,MODE_EMA,PRICE_HIGH,1);
emaLow = iMA(NULL,0,EMAPeriod,0,MODE_EMA,PRICE_LOW,1);


dtBarTime should be datetime and emaHigh and emaLow should be international var in this case.

If You use just 1 EA it is not problem but if You use many of it it's important to maximize terminal use - it should be quicker in backtests too.

3. You create commerce with market orders (except rev trade) it is okay but in fast market eg news, it could generate big slippage (terminal don't respond as quickly as brokers servers). It is not big problem but one should remember this especialy when analyzing system (sterling use stop orders). Employing Stop orders could be little more complied.

Unfortunately I am very busy today but hope I'll find some time to try this EA possibly tomorow.

I like this egy along with your job.

Regards,

Andrew

P.S. Sorry for english, it is not my first language.

pardooxcho
10-08-2022, 07:25 PM
@

If I recall correctly I think V1.2 had any logic errors that made it not follow the rules properly. This could be exactly what caused the orders not final.


I casually applied the v2 copy of your EA on friday and from monday morning it has developed a 700 USD to 2,500 USD it put orders G/U, E/J and G/Y totalling to 2,500 USD.

But I discovered that it could not close the prior rankings when other new signal came.

But because I've applied the modified one i.e. v5 it has not put one order because yesterday.

Pls check and lets understand how far.

I cant wait to find that this EA become profitable on actual acct.

Maxss280 well done, I appreciate your attempt.

lauravzquz
10-08-2022, 08:47 PM
Remove the EA version that is no longer valid i.e. the v2 and v.5 to ensure we would have same EA exactly the same result, this is to reduce confusion.

Pls do so as you upgrade the EA, currently the valid new variant is v6

good work

lauravzquz
10-08-2022, 10:09 PM
That the 1600 candle has closed and it qualified as a pub that was setup, and there was a G/U short trade that the EA placed.

If this EA is working with the principles sterling set then:
I expect the EA to shut the preceding short position and start the long position but it did not do anything

so friend look into this LOGIC very well

pardooxcho
10-08-2022, 11:32 PM
@

Can you post a screenshot of this? And is there anything at the Logs?

Due


that the 1600 candle has shut and it qualified as a setup bar, and there was a G/U brief trade that the EA placed.

If this EA is working with the principles sterling set then:
I anticipate the EA to close the previous brief position and start the long position but it did not do anything

so friend look into this LOGIC nicely

lauravzquz
10-09-2022, 12:54 AM
I dont even have the screen shot cos when he didnt do it. I relief him and that I took over.

I thot I could just clarify and you would know what region of the LOGIC is faulty

may be another time I shall Find the shots to you if to help us correct the EA

kos

pedcar
10-09-2022, 02:16 AM
Hi Maxss280,
Thanks for this EA, I've just put it on Demo and I am going to be watching it along side the 4h5EMA I'm trading manually, I believe I understand all the rules pretty well. Will allow you to know.

One query,
Will it be placing physical pending orders for everything, like we'd do manually? It will make it better to visually see where it is anticipating taking trades and placing stops that manner and getting working flawlessly quicker.

Regards, Paul

pedcar
10-09-2022, 03:38 AM
I see a problem with the EA screen shot posted,
When a new installment opens at another direction it merely closes the trade that's in profit but doesn't open another way as it should at the exact same time.
https://www.cliqforex.com/attachments/15193655513017283.png

pedcar
10-09-2022, 05:01 AM
Ok, now it has opened the market in the correct spot but it must have opened this a bar earlier, at precisely the same time it shut the buy.
https://www.cliqforex.com/attachments/15193655531078460295.png

juan.chirlaqw
10-09-2022, 06:23 AM
Hi, I am a newbie. Can someone kindly give me a step-by-step strategy about how best to import EA and Indiors to a Metatrader 4 platform and receive them runnung. Thank for your kind support. Gerg

araga73
10-09-2022, 07:45 AM
These are video's you just stick to the rules and install, can watch and observe a few times first. Enjoy

Inserted Video https://www.youtube.com/embed/IX-CQfz2GUA?origin=https://www.forum.com
Another below

Inserted Video https://www.youtube.com/embed/sfNJxzGqvhk?origin=https://www.forum.com

HOxd
10-09-2022, 09:08 AM
Hi Maxss280,
A big thank you for all of the hard work you are doing for all of us. I am currently testing the EA v1.6. Seems to work good across 11 pairs with 0.1 lots traded on the Mig demo platform. But I've observed the profit column hit 1000 and then drop way down to 300 and at times a attitude that was negative and then some of the trades are closed as per the rules. This happened almost daily during this week. Do not get me wrong, I genuinely believe in the system. But perhaps with some money management this may be a money machine that is really magnificient. Right now my account history shows 604.16 for weekly. If I simply closed all trades when the account attained 1000 during live trades or used trailing stops or take profit levels; my closed equilibrium could be 2000 by now. I know this goes against the rules of the machine but its rather fruing watching an account hit 1000 and then drop to a negative figure. Only my 2 cents.

lauravzquz
10-09-2022, 10:30 AM
Hi! Maxss280

thanks to the EA, it's functioning well

however observe the attached chart you will observe that:

- it does not enter commerce as per 5 pips to the top of the setup pub
the pub with blue arrow is your setup pub and it high is that the blue line
that ought to be the sell stop entrance point.

Though that isn't part of sterling's principles but I believe among those wise saying in forex is that never watch a winner flip looser i.e. 1100 USD down to 27 USD its na good, and I believe we ought to be taking profit @ 150 pips and anything happens thereafter is ok.
https://www.cliqforex.com/attachments/15193655541509825506.png

araga73
10-09-2022, 11:52 AM
There appeares there's a means of earning together with all the 4HR5EMA, a trailing stoploss would be good with a function to permit us to place it ourselves. Trialing a stoploss would not be a problem for im. Have the stoploss place as is and if the pair reach profit the stoploss is moved up to take profit. I think when the pair reverses the take profit isn't triggered and a loss is incured. I do knot know where im nearly $ 2000 before and a day after im just $400 in front, how to try to find out if this is happening but im having the same trouble. I believe the 4HR5EMA is rather brilliant.

lauravzquz
10-09-2022, 01:14 PM
Hi maxss280,

if you're still there, why did you begin a thing you know you cannot complete.

You started the thread and abandoned it.

That your EA has flaws, you said you need charts, now you've got charts but You're not reacting


kos

pardooxcho
10-09-2022, 02:37 PM
Ah I see.
Right now it's preparing to place a trade once it crosses that 5 pips line in addition to the spread. I think once I get the pending orders installment to were it will place the pending order rather than waiting we won't have this problem any more.
Thank you for your screenshot I will look into it again.

I see a issue with the EA screen shot ,
every time a new installment opens at the other direction it merely closes the the trade that is in profit but doesn't open the other way as it should at the same time.

pardooxcho
10-09-2022, 03:59 PM
@ e9mont
I agree with you I think some kind of MM would raise the profitability of the system. At the moment I'm behind and I am in the process of implementing a number of the rules for the post. I will see if I will include some type of trailing stop or near half place at half profit in the upcoming
Thank you for you input

Hello Maxss280,
A big thank you for all of the hard work you are doing for us all. I am currently testing the EA v1.6. Seems to work good across 11 pairs with 0.1 lots traded around the Mig demo platform. But I've observed the profit column hit 1000 and then drop down way to 300 and at times a negative figure finally some of the transactions are closed as per the rules. This happened almost daily during this week. Don't get me wrong, I genuinely believe in the system. But maybe with a few money management this may be a truly magnificient money machine. Right now my account history reveals 604.16 for weekly. But if I just closed all...

pardooxcho
10-09-2022, 05:21 PM
@Kos

Thanks for the screenshot I believe this challenge is from precisely the same thing that is causing Viperzz error over. I think after we receive a pending stop and buy orders put that we will have this mistake.

Due

Hi!

Thanks for the EA, it is functioning well

however observe the attached chart you will notice that:

- it does not enter trade according to 5 pips to the top of the set up pub
the bar with blue arrow is your set up bar and it really high is the blue line
which should be the market stop entrance point.

Though that is not a part of sterling's principles but I think one of these wise expression in FX is that never watch a winner flip looser i.e. 1100 USD down to 27 USD its na good, and I think we should be accepting profit @ 150 pips and whatever happens afterward is okay.

pardooxcho
10-09-2022, 06:43 PM
@Kos

I havn't left only been alittle busy. Had operation and have been hopped up on pain meds lol. Just got back to work today and need to get caught up with everything(That job comes first. It's the one which feeds my family and my trading habbit lol). Alot of issues to fix rather than alot of time

Hopefully I will get to making some changes this weekend.

hi,

if you are still there, why can you begin something you know you can't finish.

You started the thread and abandoned it.

That your EA has defects, you stated you need charts, now you've got charts but you are not responding


kos

lauravzquz
10-09-2022, 08:06 PM
Hi maxss280

want you rapid recovery?

I never knew you're down

thanks for all the responses and its good to know that You're back and OK

kos

pardooxcho
10-09-2022, 09:28 PM
Switch out that I am sicker than I believed. It doesn't seem like I will have the time to complete this project hopefully someone will have the ability to pick it up for us. For you support Thank you FF

ars1j
10-09-2022, 10:50 PM
I don't understand what we're working on however this EA from 1/1/08 to 1/11/08 supplied 3.66 pips of profit.

1/1 10000
31/10 10003.66

profit 9863.26
reduction 9859.6

total trades 322

I hope there is something wrong:|

Bruneymendwz
10-10-2022, 12:12 AM
Hey Max - get well soon!

staticbangs
10-10-2022, 01:35 AM
I only want to point out that I have tested the EA ver1.6
Using the default level ( 4H / 5 pips spread)
out of 1/1 to the 12 of December and all the majors revealed loss
except the EUR/USD which revealed 1900 pips profit,
That's approximately 180 pips gain a month.
From the EA testing it appears like the EUR works better then the GPB.

Bruneymendwz
10-10-2022, 02:57 AM
I only need to point out that I've tested the EA ver1.6
employing the default par ( 4H / 5 pips spread)
from 1/1 into the 12 of December and all the majors showed loss
except that the EUR/USD which showed 1900 pips profit,
That is around 180 pips gain monthly.
From the EA testing it looks like that the EUR works better then the GPB. Are you pleased that the EA is right and adhering to all the rules (50% exit rules, closes for evenings )?

I'm thinking that there must be a flaw somewhere as all guide backtesting and live trading is showing a profit!

Can it be possible to do some optimisation (distinct timeframes, distinct ExpMA's etc)?

staticbangs
10-10-2022, 04:19 AM
Are you happy that the EA is right and following all the rules (50% depart rules, closes for weekends etc)?

I'm thinking that there must be a flaw somewhere as all manual backtesting and live trading is showing a profit!

Can it be feasible to perform any optimisation (different timeframes, different ExpMA's etc)? El Dee,
I was only using the EA as is, did not alter anything,
I'm starting my way in EA programming so I didn't assess the rules/bugs
in the EA.
I will go over the code and attempt to see if all of the rules are satisfied.

Bruneymendwz
10-10-2022, 05:42 AM
Thanks Ohfx, look forward to viewing your results.
I published a re-written version of the principles (post 2472 on Sterling's thread) to try to clarify some of the misunderstandings; I understand among those EA writers had some fundamental misunderstandings so it may help to conduct the EA over a short period - a week or two 2 - and check each trade against the principles.
When I can help with clarifying anything, please ask.
Cheers