Help: How to write simple EA to buy and sell at a specific time? - page 11

 
sparky301:
How do I prevent my ea from trading Friday night and Sunday night/Monday morning, my ea only must trade Monday, Tuesday,Wednesday and Thursday nights from 10pm to 3am. Thank all of you gurus for your help.

Hello,

I've moved your post. I hope this thread could help.

 

How to specify a time range for trading?

Hi, All

I want to control my EA to trade at a specific time range, e.g. from GMT 8:00 to GMT 14:00. Is there any good implementation for this feature? Could you please give me a link? Thanks a lot!

Cheers,

Linyi

 

extern int START = 8;

extern int END = 14;

int iHourNow = TimeHour(TimeCurrent());

then...

if(iHourNow >= START && iHourNow < END){

...do some stuff here...

}

Hope that helps.

Lux

 

Buy/Sell at a particular time using file

Hello all,

I am trying to come up with MQ4 code to Buy/Sell at a particular time. The time for Buy or Sell along with when to close will be in a file. Depending on the time in the file for the day, a trade needs to open and then close as per the time.

Could anyone kindly point to a sample script ?

Any help will be highly appreciated.

Example: Time file has the following info:

2/1/2009 BUY 8:30am CLOSE 8:45 am

So on 2/1/2009 it needs to buy at that 8:30 AND close @ 8:45

Regards,

Viz

 

trade based on a openning of candle at a specific time

Hello is there an EA that opens a trade on a specific time using the difference between the high and the low + a user defined number of pips, it will maily be a stradle with an open buy +15 pips and open sell + 10 pips at a specific time with a take profit of the difference of the high and low of the candle + 25 pips added and the stop loss will be also the same, one to one profit ratio

thanks

 

The Grid System

Hello all, I had a chance to come across a trading strategy, need a lot of feed back.

1. Need to determined the overall trend, H1 should be good.

2. Example(we assume the trend is uptrend)

a. we place the first buy order with 0.01 lot

b. if the price drop 50 pip from our first buy, we place another buy order with 0.02 lot.

c. if it keeps goes down, we will double the lot size for every 50 pips drop.

eventually, we will close all the orders when it reach the profit target (quick trend reversal).

usually, for 0.01 lot, the profit target would be $0.58

we are trading on the probability of trend reverse.

any feed back on that? thanks..

 

Nothing new about this system. Do a search on GRID and also MARTINGALE and you'll get all the feedback you need.

Welcome to the forum

Lux

 

Missing the point

Wouldn't it be easier just to manual load info on Ea lets say a week and wait ea to execute at specific time set

Date

Time to execute

Currency Pair

Lot

TakeProfit

StopLoss

If Target not met close at set time I.e 6 hours

 

Time-of-day order

Hi, im using mt4 and i would like to know how to open trade at a specific time period? Is there any ea? Thanks.

 
Reason: