#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Home
Forex Forum
+ Add Script
Metastock
Expert Advisors
Explorations
Indicators
Trading Systems
Metatrader
MQL Experts
MQL Indicators
MQ4 Experts
MQ4 Indicators
MQ4 Scripts
Tradestation
Functions
Indicators
PaintBars
ShowMe
Trading Systems
Amibroker
Commentaries
Explorations
Functions
Indicators
Trading Systems
Contact us
Newsletter
Group: Metatrader MQ4 Scripts
Title: Buy
Description:
Buy script...has 20 pip sl and no tp...modify as needed
//+------------------------------------------------------------------+ //| Buy.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #include
#property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" //+------------------------------------------------------------------+ //| script "trading for all money" | //+------------------------------------------------------------------+ int start() { int ticket; //---- while(true) { ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,3,Ask-20*Point,0,"expert comment",255,0,CLR_NONE); if(ticket<=0) { int error=GetLastError(); Print("Error = ",ErrorDescription(error)); if(error==134) break; // not enough money if(error==135) RefreshRates(); // prices changed break; } //---- remove break statement below and take trading for all money else { OrderPrint(); break; } //---- 10 seconds wait Sleep(10000); } //---- return(0); } //+------------------------------------------------------------------+
Author/Source:
?
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact