Basic Manual Traders' EA

Place your new trading idea here to see if someone can automate it.
Post Reply
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Basic Manual Traders' EA

Post by Radar »

High again, folks,

I wonder if someone would code an EA for manual traders, using movable boxes to open and close positions, using code by matrixebiz, as found in Steve's BOJ thread on forexfactory http://www.forexfactory.com/showthread. ... ost3225961...

Code: Select all


if (ObjectFind("CloseAll") == -1)
        {
          ObjectCreate("CloseAll", OBJ_LABEL, 0, 0, 0);
          ObjectSet("CloseAll", OBJPROP_BACK, 0);
          ObjectSet("CloseAll", OBJPROP_CORNER, 0);
          ObjectSet("CloseAll", OBJPROP_XDISTANCE, 6);
          ObjectSet("CloseAll", OBJPROP_YDISTANCE, 50);
          ObjectSetText("CloseAll","CloseAll", 12,"Times New Roman",Blue);
        }
	
if (ObjectFind("CloseAll") != -1&&ObjectGet("CloseAll", OBJPROP_XDISTANCE)!=6)
        {
          ObjectSet("CloseAll", OBJPROP_XDISTANCE, 6);
          ObjectSet("CloseAll", OBJPROP_YDISTANCE, 50);
          CloseAllTrades();
        }


Just change the name of the object, and the name of the routine that it calls, for Buy, Sell, Close, and any other functions you'd like to kick off manually, and adjust the co-ordinates.

For now, I'd like this EA to make the trade, set BreakEven, BreakEvenProfit, StopLossType, StopLossSize, and TakeProfit, then manage the trades, but if someone makes MPMBM (see http://www.stevehopwoodforex.com/phpBB3 ... f=12&t=778, then it will need to be able to pass those settings on.


Take care,

&

Have fun!

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Basic Manual Traders' EA

Post by gaheitman »

Radar wrote:High again, folks,

I wonder if someone would code an EA for manual traders, using movable boxes to open and close positions, using code by matrixebiz, as found in Steve's BOJ thread on forexfactory http://www.forexfactory.com/showthread. ... ost3225961...

Code: Select all


if (ObjectFind("CloseAll") == -1)
        {
          ObjectCreate("CloseAll", OBJ_LABEL, 0, 0, 0);
          ObjectSet("CloseAll", OBJPROP_BACK, 0);
          ObjectSet("CloseAll", OBJPROP_CORNER, 0);
          ObjectSet("CloseAll", OBJPROP_XDISTANCE, 6);
          ObjectSet("CloseAll", OBJPROP_YDISTANCE, 50);
          ObjectSetText("CloseAll","CloseAll", 12,"Times New Roman",Blue);
        }
	
if (ObjectFind("CloseAll") != -1&&ObjectGet("CloseAll", OBJPROP_XDISTANCE)!=6)
        {
          ObjectSet("CloseAll", OBJPROP_XDISTANCE, 6);
          ObjectSet("CloseAll", OBJPROP_YDISTANCE, 50);
          CloseAllTrades();
        }


Just change the name of the object, and the name of the routine that it calls, for Buy, Sell, Close, and any other functions you'd like to kick off manually, and adjust the co-ordinates.

For now, I'd like this EA to make the trade, set BreakEven, BreakEvenProfit, StopLossType, StopLossSize, and TakeProfit, then manage the trades, but if someone makes MPMBM (see http://www.stevehopwoodforex.com/phpBB3 ... f=12&t=778, then it will need to be able to pass those settings on.


Take care,

&

Have fun!

Radar =8^)
I'm not sure how this would be better than a series of scripts. In my trading, I have scripts to open and close market and pending orders, set break even, adjust TP, etc. The thing this lacks is OCO ability, but eventually I am going to look at the script Gary and I played with some time ago that apparently still doesn't work. :>

George
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: Basic Manual Traders' EA

Post by Radar »

Hi George,

gaheitman wrote:
Radar wrote:High again, folks,

I wonder if someone would code an EA for manual traders, using movable boxes to open and close positions, using code by matrixebiz, as found in Steve's BOJ thread on forexfactory http://www.forexfactory.com/showthread. ... ost3225961...
I'm not sure how this would be better than a series of scripts. In my trading, I have scripts to open and close market and pending orders, set break even, adjust TP, etc. The thing this lacks is OCO ability, but eventually I am going to look at the script Gary and I played with some time ago that apparently still doesn't work. :>

George

Just that it seems quicker and easier to me, is all... Just throw it on a chart, give it a magic number, then pull the trigger when you see a good setup, and let MPTM or MPBM do the management.

This little thing was just an add-on thought, something I came up with after thinking about having one instance of a trade management bot to manage all trades and baskets, (MPMBM) using global variables to store settings for each, and using a script to change settings as required. So one management EA, one script, and one trade EA (or as many trade EA's that are converted to use them as people like).

My problem is that I see good concepts, and ways to combine them, but I can't code for nuts... My head hurts just thinking of coding, so I thought I'd ask for help... I figured there'd be some other traders that might like the idea of pulling the trigger and walking away, knowing the trade will be managed.

OCO?? One Click Only? ;)

Take care,

&

Have fun!

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
garyfritz

Re: Basic Manual Traders' EA

Post by garyfritz »

Order Cancels Order. Empty4 implements a simple version of this with its pending orders; when the TP is hit, the SL is canceled, and vice versa. In a breakout strategy, you might want to cancel the short entry when the long entry is hit, and vice versa.

George wrote a script to implement OCO for a breakout, but sometimes it doesn't work. And neither of us could ever figure out why. :? (But since I was trading that strategy on an account at PFG, it hasn't been an issue recently.......)

While you can certainly do anything with scripts, I think it would be nice to have something more visual, and more self-contained. E.g. say you wanted to trade the stairstep strategy outlined at http://www.forexfactory.com/showthread.php?t=302007. It would be nice to have a visual method to draw the box, drag it around as necessary, and have the EA (or script?) automatically calculate and place the entry & exit orders, OCO the breakout orders, etc. The concepts of a breakout strategy are generic enough that I think an EA like that would be applicable for a lot of manual traders.

If I had any spare time, I would have written one already. But I don't, so I haven't. :oops:
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: Basic Manual Traders' EA

Post by Radar »

Hey Gary,
garyfritz wrote:Order Cancels Order. Empty4 implements a simple version of this with its pending orders; when the TP is hit, the SL is canceled, and vice versa. In a breakout strategy, you might want to cancel the short entry when the long entry is hit, and vice versa.
Ahh, thanks for the explanation :)
While you can certainly do anything with scripts, I think it would be nice to have something more visual, and more self-contained. E.g. say you wanted to trade the stairstep strategy outlined at http://www.forexfactory.com/showthread.php?t=302007.
I started reading that thread about 5 minutes before you posted this.
It would be nice to have a visual method to draw the box, drag it around as necessary, and have the EA (or script?) automatically calculate and place the entry & exit orders, OCO the breakout orders, etc. The concepts of a breakout strategy are generic enough that I think an EA like that would be applicable for a lot of manual traders.

If I had any spare time, I would have written one already. But I don't, so I haven't. :oops:
And here's where I end up with brain overload:( I just can't seem to soak up and apply info as easily as I used to:(

One day, maybe... ;)

Take care,

&

Have fun!

Radar =8^)
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Basic Manual Traders' EA

Post by gaheitman »

garyfritz wrote:While you can certainly do anything with scripts, I think it would be nice to have something more visual, and more self-contained. E.g. say you wanted to trade the stairstep strategy outlined at http://www.forexfactory.com/showthread.php?t=302007. It would be nice to have a visual method to draw the box, drag it around as necessary, and have the EA (or script?) automatically calculate and place the entry & exit orders, OCO the breakout orders, etc. The concepts of a breakout strategy are generic enough that I think an EA like that would be applicable for a lot of manual traders.

If I had any spare time, I would have written one already. But I don't, so I haven't. :oops:
The scripts I wrote read the price from where I drop them on the chart (for pending orders and moving SL and TP), so you could draw your boxes and place your pending orders with two more drags and drops. Of course, no OCO, so you'd be on the hook for deleting the other one that doesn't get hit. Maybe I'll take a look at that one again with fresh but slightly older eyes.

Here's the relevant section of my favorites.
IMG_24.gif
The scalp ones are really market orders. I even have scripts to draw rectangles so I can correctly place the pending orders. The MonitorTrades EA just pages me if a trade is opened or closed. That's for my GCO trades -- George Cancels Other. :lol:

George
You do not have the required permissions to view the files attached to this post.
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: Basic Manual Traders' EA

Post by Radar »

Hmmm...Maybe use a script to draw "local" pending trade lines on the chart, and an EA to send the trades, then delete the lines...

Steve's "Waiting to Buy" and "Waiting to Sell" EA's draw a "local" pending trade line on the chart (which you can adjust), and then deletes the line when the trade is sent... He also has a "Trade Stacker" EA, with a pair of scripts, one that draws "local" pending buys (green lines), and one that draws sell lines (blue).

I forget which thread I found them on, so I've zipped the lot up for you to look at.

Hope these hit the spot for you ;)
You do not have the required permissions to view the files attached to this post.
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Basic Manual Traders' EA

Post by SteveHopwood »

Radar wrote:Hmmm...Maybe use a script to draw "local" pending trade lines on the chart, and an EA to send the trades, then delete the lines...

Steve's "Waiting to Buy" and "Waiting to Sell" EA's draw a "local" pending trade line on the chart (which you can adjust), and then deletes the line when the trade is sent... He also has a "Trade Stacker" EA, with a pair of scripts, one that draws "local" pending buys (green lines), and one that draws sell lines (blue).

I forget which thread I found them on, so I've zipped the lot up for you to look at.

Hope these hit the spot for you ;)
It would not be hard to combine the two Waiting ea's into one to create an adjustable box for manual traders. I am not going to do it because I have no need to, but it would be easy.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: Basic Manual Traders' EA

Post by Radar »

I've stuck something together, and posted it here... http://www.stevehopwoodforex.com/phpBB3 ... 555#p75555

Let's hope the glue sticks ;)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
Post Reply

Return to “Ideas for Possible Automation”