GVMN ALR2 EA and Pending order script

Post your EA's using ALR here
Post Reply
Yuggr
Trader
Posts: 12
Joined: Thu Dec 01, 2011 11:00 pm
Location: Garden of England

GVMN ALR2 EA and Pending order script

Post by Yuggr »

I have been playing around with The Flow plus ALR method using the ALR2 EA generously supplied by SpiderX, Milanese (Tommaso), Steve Hopwood, phil_trade et. al, and the AB_EA_Pending place order with magic number script by Another Brian. I have found these items a great benefit but with a few limitations where the input of magic numbers buffer pips and TL/SL are concerned.

To this end I've made a few basic modifications to the supplied code for my own benefit which I thought may be of use to other semi manual and EA traders.

ALR2 can look after manually placed trades with the same magic number of the EA and AB_EA_Pending can send orders with a specific magic number.

I’m not sure how relevant this will be now that we have The Flow plus ALR EA by Milanese but as suggested by Dewey McG and renamed at the request of Another Brian I have placed small modified versions of ALR2 Trade Manager v1.01 and AB_EA_Pending Order placement script with global variable magic number set in this new thread so it will be easier for everyone to find.

It would be possible to modify the order send script to allow for it to be used with other trade selection methods with ALR2 so this global variable magic number set idea may still have some mileage in it.

Now to the point of this post.

ALR2 Trade Manager v1.01 has had a small modification made to it to save the magic number set in the EA properties to a global variable associated with the currency pair Renamed to:
ALR2_Trade_Manager_GVMN.

AB_EA_Pending script has been modified to follow ‘The Flow plus ALR’ order placement rules allowing for setting TP, SL and buffer pips, also Lifesys pip factor code has been added to account for different pips per currency pair. I have also added inputs for pending order expiry time. Renamed to:
ALR2_First_Order_Placement.

If the magic number in the scripts properties is set to -1 the script will use the global variable for the magic number set by the modified ALR2 EA allowing ALR2 to take control on the first manually placed order.

If magic number is set to -1 but no global variable is set for the currency pair the magic number will default to 1.

The order placement has been limited to Buy and Sell stop orders only with the Buy and Sell limit orders commented out in the script.

Drag script above bid line to place a Buy Stop order at buffer pips above previous day’s high.
Drag script below ask line to place a Sell Stop order at buffer pips below previous day’s low.

Both the above comments assume that the current Bid/Ask is below/above the previous High/Low. If not you will get an error as the order Buy/Sell Stop order is not allowed.

These two small modifications will allow for order placement without manual entry of the magic number set in ALR2 allowing it to control the first manually placed trade with little or no intervention.

E.G. Place ALR2_Trade_Manager_GVMN EA on EURAUD with magic number in properties set to 345800.

Drag ALR2_First_Order_Placement script onto EURAUD chart above bid line and it will place a Buy Stop buffer pips above the previous day high with TP/SL and the same magic number as the ALR2 EA on EURAUD.

Opposite for sell orders.
You do not have the required permissions to view the files attached to this post.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

GVMN ALR2 EA and Pending order script

Post by Dewey McG »

Thanks for posting!
Yuggr
Trader
Posts: 12
Joined: Thu Dec 01, 2011 11:00 pm
Location: Garden of England

GVMN ALR2 EA and Pending order script

Post by Yuggr »

I have made an additional quick modification to the first order placement script.

Although this is still currently following the rules of the Flow plus ALR system i.e. placing a Buy or Sell stop order buffer pips above or below the previous candles high or low. You can now select the previous candles time frame rather than being lock into the day time frame.

The script defaults to the current charts time frame or you can select another time frame in the scripts properties drop down menu.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated Loss Recovery”