Specific time
Specific time
22 Jul 2017, 18:57
Hi everyone,
I am trying to create a bot that opens operations at a specific hour and minute based on the previous day, ie if the previous day is fall, the bot opens operation in the opposite direction, purchase.
The take and the stop will vary from market to market.
Can someone help me?
Thank you so much
Replies
DelFonseca
23 Jul 2017, 20:07
RE:
lec0456 said:
If you wanted to place a trade everyday at 8:15 UTC, for example, you could just say:
If (Server.Time.Hour==8 && Server.Time.minute==15)
Execute Trade...
you get the daily series by:
Daily = MarketData.GetSeries(TimeFrame.Daily);
And the index by:
var dailyindex = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime[t0]);
and get yesterdays high by:
Daily.High[dailyindex-1];
Thank you so much lec0456.
i'll try.
tanhk you
@DelFonseca
lec0456
22 Jul 2017, 20:51
If you wanted to place a trade everyday at 8:15 UTC, for example, you could just say:
If (Server.Time.Hour==8 && Server.Time.minute==15)
Execute Trade...
you get the daily series by:
Daily = MarketData.GetSeries(TimeFrame.Daily);
And the index by:
var dailyindex = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime[t0]);
and get yesterdays high by:
Daily.High[dailyindex-1];
@lec0456