Here money, havent tried it yet but found a couple timecur changes. may wanna give it a go on a demo first.
Attached File(s)
Straddle_Trail.mq4
51 KB
|
1,276 downloads
News Trading - Straddle 11 replies
Which Broker for News Straddle trading? 9 replies
Trading the news - straddle entries on GBPUSD 1 reply
Straddle technique for news announcement? 9 replies
Request: Reverse Straddle 1 reply
Quoting C.E.O.DislikedHere money, havent tried it yet but found a couple timecur changes. may wanna give it a go on a demo first.Ignored
DislikedFrom some of the post I see in using this EA, there are some things one should be aware of.
If you do not see a trade, its because price did not fit the criteria you have setted up for the time range you had specified.
If your trade did not get executed, please review past price before and during news time for your broker down to the the one minute chart.
Please review Maxey's thread for trading the news, he has an excellent spreadsheet which shows the average maximum PIPs and deviation from various news.
In my opinion, using the EA is the way to go since I find many times that I cannot trade manually with my broker because of either re-quotes, system freezes, etc. I normally have my EA triggered approx 5-10 minutes before news time.
Yes, it would be great if people would post the settings they use for different news, but if something fails, I am sure there would be finger pointing that so and so )*&^&* up..... I have seen such things....Ignored
Dislikedneed help!!!!!!!!!!!!!!!!!!
i do like this ea , but for some resone it does not triger all the time.
what do i do young?
1.it is on at lest 10 min. befor
2. the right time.
do i need to close the platform and reopen?
i'm lost.
thanks for the help.Ignored
DislikedI had the same problem you had initially wondering why something would not trigger at all. This is what I did:
>> check the time you had specified
>> go down to the one minute chart
>> check if price ever touched what you had specified
>> if not, try adjusting your slippage
this can be tested in demo very easily by forward testing. Just specify ten minutes before whatever time you want on any pair that moves. If it still does not trigger, you can do the following for me, and I will look at it:
>> broker
>> currency pair
>> settings of the EA
>> screen shot
I hope for the EA, you see the SMILEY face in the top right hand corner, most people will miss that....Ignored
DislikedOrange,
Try use this modified version - no time checking.
It will place the order as soon as you hit the Expert Advisor at the menu bar.
Inserted Code//+------------------------------------------------------------------+ //| Straddle_EA.mq4 | //| branac | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "branac" #property link "http://www.metaquotes.net" //---- input parameters extern double Lots=0.1; extern double Pips=10; extern double TP=10; extern double SL=10; extern bool Buy=true; extern bool Sell=true; int buy_orders=0; int sell_orders=0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- int ticket; // The spread is included in the sl and tp calculations double buy_price = Ask + Pips*Point; double sell_price = Bid - Pips*Point; double stoploss_buy; double takeprofit_buy; double stoploss_sell; double takeprofit_sell; if (SL == 0) { stoploss_buy = 0; stoploss_sell = 0; } else { stoploss_buy = Bid+(Pips-SL)*Point; stoploss_sell = Ask-(Pips-SL)*Point; } if (TP == 0) { takeprofit_buy = 0; takeprofit_sell = 0; } else { takeprofit_buy = Ask+(Pips+TP)*Point; takeprofit_sell = Bid-(Pips+TP)*Point; } // Buy order if ( (Buy == true) && (buy_orders == 0) ) { ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,buy_price,2,stoploss_buy,takeprofit_buy,"Buy order ",00001,0,CLR_NONE); if (ticket<0) { Print("OrderSend failed with error #",GetLastError()); return(0); } else { buy_orders++; } } // Sell order if ( (Sell == true) && (sell_orders == 0) ) { ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,sell_price,2,stoploss_sell,takeprofit_sell,"Sell order ",00002,0,CLR_NONE); if (ticket<0) { Print("OrderSend failed with error #",GetLastError()); return(0); } else { sell_orders++; } } return(0); } //+------------------------------------------------------------------+
For whatever the reason, the code if (LocalTime()>=_Date) is not working on my end no matter what time I place there. So I removed it. The original code will not re-send an order if there was error encountered. This version however is persistent and will keep sending the order request until it is accepted.Ignored