Orders Execution
0
Views
0
Downloads
0
Favorites
four4
extern double lot=0.1;
extern int SL=140;
extern int TP=80;
extern int timebuy=16;
extern int timesell=12;
int day, day2;
extern bool buy=true;
extern bool sell=true;
int start()
{
if (buy==true&&TimeHour(TimeCurrent())==timebuy&&TimeDay(TimeCurrent())!=day)
{
{
OrderSend(Symbol(),OP_BUY,lot,NormalizeDouble(Ask,Digits),3,Bid-SL*Point,Ask+TP*Point,"My order #",11111,0,Green);
day=TimeDay(TimeCurrent());
}
}
if (sell==true&&TimeHour(TimeCurrent())==timesell&&TimeDay(TimeCurrent())!=day2)
{
{
OrderSend(Symbol(),OP_SELL,lot,NormalizeDouble(Bid,Digits),3,Ask+SL*Point,Bid-TP*Point,"My order #",22222,0,Red);
day2=TimeDay(TimeCurrent());
}
}
return(0);
}
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---