stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

TMA_CG: EA to buy at support & sell at resistance
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3372
Page 6 of 30
Author:  Radar [ Mon Jan 13, 2014 10:39 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Hey SpiderX,
SpiderX » Mon Jan 13, 2014 8:19 pm wrote:Hi dudest
Maybe it is wise to check if the stack trade price is too close to the target price.
for todays trade the stack trade price is too close to the target....fortunately it ended in a 5 pip win

Cheers
I did that with my StackMan EA, though you have to enter the outer ranges yourself. I used BuyProjectedProfit & SellProjectedProfit, which could also be used as TP.

Since this EA uses the bands as TP, you can filter the stacking with something like...

Code: Select all

// for Buys
if (Upper_Band - Ask > BreakEvenPips)
{
Buy_Scale_In;
}

// for Sells
if (Bid - Lower_Band > BreakEvenPips)
{
Sell_Scale-in;
}
...Adjust to suit actual code in EA ;)

Have fun!
Radar =8^)
Author:  bazze [ Mon Jan 13, 2014 10:48 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Radar,where shall I copy/paste this snippet into the EA? Haven't done this before,but wish to try...(Offcourse if it's only to copy/paste...)
Author:  Radar [ Mon Jan 13, 2014 10:55 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Hey Bazze,
bazze » Mon Jan 13, 2014 9:18 pm wrote:Radar,where shall I copy/paste this snippet into the EA? Haven't done this before,but wish to try...(Offcourse if it's only to copy/paste...)
Nowhere, mate ;) I haven't looked at the code for this EA, so just wrote a rough outline of what could be done.

Glad ya asked first :)

Have fun!
Radar =8^)
Author:  bazze [ Mon Jan 13, 2014 11:22 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

Okay,then I let it be :smile:
Author:  dudest [ Mon Jan 13, 2014 11:41 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

dudest » Mon Jan 13, 2014 12:43 pm wrote:
skoda2008 » Mon Jan 13, 2014 6:06 am wrote:Radar, you just beat me - I was typing exactly the same thing. Anyone would think we were on the PT3 payroll :P

Dudest, I have found a couple of bugs with the EA. There is a lack of magicnumber checking in some sections - the missing TP code, and also the Jumping Stop. I found this out when I put it on an account with another EA running. It wanted to add TP's to my other positions (lucky I tried it on manual confirmation first).
Hey skoda!, thanks for the feedback.

@WFA: tried the Darwin, needs some fixing. Will check out PT3 end of this week after backtester repair, thanks :)

@Bugs + lack of MagicNumber checking: well, that's coz I run each EA I'm testing on its own Demo, that's why I didn't put MagicNumber checking in each function. But you're right, it needs to be there to avoid messing up an account running other things. Good thing it tried to secure you money by setting TPs though :)!

Cheers!
Hi Skoda,

Each section now has Magic Number checking and Symbol checking as follows:

Code: Select all

if ( StringFind (Symbol(), "XAU", 0) == -1 ) continue;
if ( (OrderMagicNumber() != 1000) && (OrderMagicNumber() != 3000) ) continue;
NB:
# Magic number 1000 = normal trade
# Magic number 3000 = stack trade
[ Magic number 2000 was for continuation trades, but removed that feature ]

PS: if peeps would like the magic number variables to be extern ( configurable ), just holla and I'll make the change

Cheers!
Author:  dudest [ Mon Jan 13, 2014 11:52 am ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

SpiderX » Mon Jan 13, 2014 12:49 pm wrote:Hi dudest
Maybe it is wise to check if the stack trade price is too close to the target price.
for todays trade the stack trade price is too close to the target....fortunately it ended in a 5 pip win

Cheers
Hey SpiderX!

Great observation and feedback!, thanks :)

I know it sounds strange, but I actually don't mind those :)

In the past 1 week, there have been 5.

However, I can add a configurable parameter to disable taking stack trades when TP is less than 'x' no. of pips

Cheers!
tmacg_gold_m15_magic_no_3000_stack_trades.png
Author:  dudest [ Mon Jan 13, 2014 12:01 pm ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

cad0811 » Mon Jan 13, 2014 1:07 pm wrote:
Thank you for your sharing, thank you!I test the ea, monetary name XAUUSDm, didn't seem to work, thank you!
That's strange :|

There's nowhere I've hard-coded the symbol name...

What broker are you running it on? Do you see any error in the Experts or Journal tabs?

.
Author:  dudest [ Mon Jan 13, 2014 12:06 pm ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

jlcgarcia » Mon Jan 13, 2014 1:09 pm wrote:Hi dudest,

I am using in my live account a strategy very similar to yours. The difference is that my multipair EA do not open orders when it touches the S/R points, but it first must surpass the full S/R zone and return to the low/high zone of resistance/support to open a new trade.

Also, from my experience stacking is not very easy to implement and must be based on ATR (4H or more). It is only an opinion. :P

Regards


José Luis
Hey JL!, good to see you here :)!

Are you using Slipshod's SSSR by any chance? I thought about doing that once (waiting for price to return to high/low before buying/selling), but I always was a "touch-and-go!" kinda guy :). Goodstuff!

My take on 'stacking' for this EA is VERY rudimentary ( only a single trade after original trade has moved to BreakEven ). I have tried the other method of just blindly opening stack trades every JumpingStopPips; when price + intent is in one direction, makes QUITE a bit. However, in a VERY TYPICAL day, price ebbs and flows, and many of the stack trades get stopped even if eventually their TP got reached. So keeping it really simple.

Thanks JL, hope to hear more from you!

Cheers
Author:  dudest [ Mon Jan 13, 2014 12:16 pm ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

bazze » Mon Jan 13, 2014 1:35 pm wrote:Three trades closed so far...-$99,+$124.16 and +$18.56.That gives a total of +$36.93 on my $5000 demoacc.Changed the risk from 3 to 2,rest default...Looking good so far :clap:
Edit: New trade open,at the moment up $16...
That's great bazze :)

So if I calculate correctly:

# Your lotsize = (0.02 * 5000 = $100) / (30pips SL) = $3.3 per pip ==> 0.33 lots

Trade 1: -$99 ==> 30 pips SL
Trade 2: +$124.16 ==> 37.62 pips TP
Trade 3: +$18.56 ==> 5.62 pips TP

My trades today so far:
Trade 1: -54.1 pips ( got slipped crazy :/ that's almost an extra trade worth of SL! )
Trade 2: +38.0 pips
Trade 3: +4.8 pips
Trade 4: BUY trade waiting for NY to open before deciding where to go :)

Cheers!
Author:  dudest [ Mon Jan 13, 2014 12:24 pm ]
Post subject:  Re: TMA_CG: EA to buy at support & sell at resistance

An example of how I trade manually:

This is a case of S/R level + price action signal: GBPNZD D1 BEEB ( bearish engulfing bar )

Before:
20140111_gbpnzd_d1_beeb.png
Currently: TP1 taken around 1.9640 and SL moved lower (from high of BEEB)

-----------

A touch-trade in this case would have been to set a pending order ( SELL LIMIT ) at the VBRN (very big round number) 2.0000 when price was retracing after initially breaking 2.0000

-----------

Cheers
All times are UTC Page 6 of 30