TMA_CG: EA to buy at support & sell at resistance

Post Reply
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: TMA_CG: EA to buy at support & sell at resistance

Post by dudest »

pete14 » Mon Jan 20, 2014 6:44 pm wrote: Ok, I think I found the problem.
Every time I change something within the EA, i.e. from 20 pips stop loss to 0.02, which means 20 pips in a currency, a new trade is opened.
Anyhow, how can manage it that the EA takes profit at the middle line or the second line (red when long green when short)?
Thanks
Peter
PS: the EA is already using proper pip values (for all settings apart from MaxSpread).

So if you change 20 to 0.02, and the PFactor is still 10, you get (0.02/10) pips (!!)

And even if you've changed PFactor to 10000, 0.02 will get you (0.02/10000) pips (!!)

20pips in a currency pair is 0.0020 ( for a 5-digit broker, there's an extra 0 with no value )

Cheers
yihao
Posts: 2
Joined: Thu Jan 16, 2014 7:24 am

Re: TMA_CG: EA to buy at support & sell at resistance

Post by yihao »

Seems like the EA is not taking profits?
My profit is shown in points.
gold.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by yihao on Tue Jan 21, 2014 2:02 pm, edited 1 time in total.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: TMA_CG: EA to buy at support & sell at resistance

Post by milanese »

» Tue Jan 21, 2014 1:56 pm wrote: Seems like the EA is not taking profits?
My profit is shown in points.

Hi , if you will attach you image here direct your post will be better readable for all :)
Look here if you don't know how to do that ..http://www.stevehopwoodforex.com/phpBB3 ... =10&t=3373

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
yihao
Posts: 2
Joined: Thu Jan 16, 2014 7:24 am

Re: TMA_CG: EA to buy at support & sell at resistance

Post by yihao »

Sorry, just updated it! :)
pete14
Trader
Posts: 73
Joined: Thu Feb 02, 2012 1:29 pm
Location: Germany

Re: TMA_CG: EA to buy at support & sell at resistance

Post by pete14 »

dudest » Tue Jan 21, 2014 1:30 pm wrote:
pete14 » Mon Jan 20, 2014 6:44 pm wrote: Ok, I think I found the problem.
Every time I change something within the EA, i.e. from 20 pips stop loss to 0.02, which means 20 pips in a currency, a new trade is opened.
Anyhow, how can manage it that the EA takes profit at the middle line or the second line (red when long green when short)?
Thanks
Peter
PS: the EA is already using proper pip values (for all settings apart from MaxSpread).

So if you change 20 to 0.02, and the PFactor is still 10, you get (0.02/10) pips (!!)


And even if you've changed PFactor to 10000, 0.02 will get you (0.02/10000) pips (!!)

20pips in a currency pair is 0.0020 ( for a 5-digit broker, there's an extra 0 with no value )

Cheers
dudest,
thanks a lot for your detailed explanation.
Unfortunately the stop loss in currencies does not work out. Even if I change it into 0.0020
it still remains the same as it is for Gold, i.e. 20. Even if I try to set the SL manually it jumps back to the Gold value (i.e. gbp/cad, short: price: 1.80912, manual SL set at 1.81112 shows for a second and then jumps to 3.8090)
With middle or outer lines I meant that an open trade is closed by the EA on the opposite or middle line.(i.e. if I was short the trade would be closed when the middle line or the green line is reached, depending on the traders wish, or vice versa)

I hope I expressed myself well enough that you might be able to understand what I mean.

I really appreciate your help

Peter
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: TMA_CG: EA to buy at support & sell at resistance

Post by dudest »

yihao » Tue Jan 21, 2014 4:56 pm wrote:Seems like the EA is not taking profits?
My profit is shown in points.
gold.jpg
In this scenario, the TP should be at the LOWER BAND.

But price fell past the lower band, and you can't set a TP behind price (i.e, the platform won't allow it, very normal).

So what happens in these cases is that the EA keeps trying, and finally when the lower band catches up to price the TP is set [ good thing, really, since price can keep moving a long way in your direction before TP is set and hit ]

PS1: Same thing applies to longs breaking the upper band suddenly when a buy is in effect and TP hadn't been set by the time price broke out.

PS2: I didn't tell you guys this but ver "D" has a break-out component, and that was a breakout trade. On your trade comment it should show up like this: " short: 1248.89;-0.7807;#4 "

Cheers
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: TMA_CG: EA to buy at support & sell at resistance

Post by dudest »

pete14 » Tue Jan 21, 2014 6:06 pm wrote:
dudest,
thanks a lot for your detailed explanation.
Unfortunately the stop loss in currencies does not work out. Even if I change it into 0.0020
it still remains the same as it is for Gold, i.e. 20. Even if I try to set the SL manually it jumps back to the Gold value (i.e. gbp/cad, short: price: 1.80912, manual SL set at 1.81112 shows for a second and then jumps to 3.8090)
<Sigh>...

Ok, try this:
TMACG_M15_currency_version_C.mq4
If you change the SL manually ( why would you?! ), the EA will change it back to StopLossPips setting
With middle or outer lines I meant that an open trade is closed by the EA on the opposite or middle line.(i.e. if I was short the trade would be closed when the middle line or the green line is reached, depending on the traders wish, or vice versa)

I hope I expressed myself well enough that you might be able to understand what I mean.

I really appreciate your help

Peter
How do you propose we tell the EA how to know when to TP at the middle line and when to TP at the opposite line?
You do not have the required permissions to view the files attached to this post.
Last edited by dudest on Tue Jan 21, 2014 8:38 pm, edited 1 time in total.
pete14
Trader
Posts: 73
Joined: Thu Feb 02, 2012 1:29 pm
Location: Germany

Re: TMA_CG: EA to buy at support & sell at resistance

Post by pete14 »

first of all : you're simply great

Maybe the trader should have an option to chose if he wants the TP to be at the middle line or opposite line.
Is this possible?
The other option that I use now is very simple:
I use mptm for SL ( i.e. all trades are closed at i.e. 20 pips and for TP all trades are closed at i.e. 60 pips)
but I think its much better to have the TP at the fore mentioned lines.
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: TMA_CG: EA to buy at support & sell at resistance

Post by dudest »

pete14 » Tue Jan 21, 2014 11:07 pm wrote:first of all : you're simply great

Maybe the trader should have an option to chose if he wants the TP to be at the middle line or opposite line.
Is this possible?
The other option that I use now is very simple:
I use mptm for SL ( i.e. all trades are closed at i.e. 20 pips and for TP all trades are closed at i.e. 60 pips)
but I think its much better to have the TP at the fore mentioned lines.
Updated version attached.

New parameter: TP_At_Opposite_Band = true;

When true (default), EA will TP at opposite band. When false, EA will TP at middle band.

Cheers
TMACG_M15_currency_version_C.mq4
You do not have the required permissions to view the files attached to this post.
pete14
Trader
Posts: 73
Joined: Thu Feb 02, 2012 1:29 pm
Location: Germany

Re: TMA_CG: EA to buy at support & sell at resistance

Post by pete14 »

This looks great, dudest.
I will set it up tomorrow and will then demo it because I got to go to bed now. I'm working tomorrow.
I will report how it's going. I see a lot of potential in this. Today using the mptm I made about 5% on a 10000$ demo account
trading 0.2 lots using all available currencies.
Once more
Thanks a lot and all the best
Peter
Post Reply

Return to “Automated trading systems”