View Single Post
 
Old 03-31-2007, 06:57 PM
techinvest techinvest is offline
Member
 
Join Date: Dec 2005
Posts: 58
techinvest is on a distinguished road
Quote:
Originally Posted by amenlo9
thanks for sharing it.is it possible to set fixed SL and TP together once we execute the script?
Not To my knowledge. This is something I would be using to beat the brokers spike when news is released due to getting it a bit faster. You can modify the scripts for different SL's and TP's or remove the TP alltogether and close it manually.

Say have one script you execute via hotkeys for a 10 pip SL, and call it HotKey_Buy_10SL and assign 1 key to it. Or another with a different SL you'd assign another Hotkey to.

The key here for me is speed. Modifying the SL's and TP's would have to be done via an EA and when you have only seconds to react, I think you'd end up losing the trade altogether.


The other alternative is to straddle the news, but most brokers aren't a fan of this and you run the risk of the brokers widening the spreads so far that both your SL's will get hit expecially with the whipsaws. Thus might be a better alternative.

Here are the scripts with no TP, but I've added a script to close the order which you can assign a new hotkey to as well.

The only thing is this:

You must have the correct chart window selected (for the pair you're trading) once you hit the hotkey buy or sell. Otherwise you're going to enter a position in the pair who's window is selected (which may not be what you want). So be sure.

The close script was designed to exit the LAST position opened in that pair. Again, make sure the right window is selected. This way if you have one open position in the pair prior to making a news trade it'll be the last one you entered that gets closed. It closes both buy and sell positions. So keep that in mind. It's really designed to trade a pair that has no open positions... just for news.
Attached Files
File Type: mq4 HotKey_Buy_No_TP.mq4 (1.7 KB, 131 views)
File Type: mq4 HotKey_Sell_no_TP.mq4 (1.7 KB, 103 views)
File Type: mq4 HotKey_Close_Buy_or_Sell_No_TP.mq4 (1.8 KB, 111 views)

Last edited by techinvest : 03-31-2007 at 06:59 PM.