FAQ |
Calendar |
![]() |
|
Forex Diskusi apapun tentang Forex disini. |
![]() |
|
Thread Tools |
#1
|
||||
|
||||
![]()
//+------------------------------------------------------------------+
//| Latihan EA-1.mq4 | //| Heri Santoso | //| | //+------------------------------------------------------------------+ #property copyright "Heri Santoso" #property link "http://www.ExnessForex.com" extern string EA_Setting = "---------------------< EA Setting >---------------------"; static int TimeFrame = 0; extern double Lots = 0.03; extern int TakeProfit = 10; extern int Stoploss = 5; extern int Slippage = 10; extern int Magic = 123456; int TampilanChart; int num; double hore,profit,score; int max,counter,maxo; string b; double koko; int init() { hore = 0.03; num=MathRand()%2+1; profit=0;counter=0; score=0; max=0; maxo=0; //---- if(Digits==5) { TakeProfit=10*TakeProfit; Stoploss = 10 * Stoploss; Slippage = 100 * Slippage; Print("Digits = ",Digits); } Comment("Install EA..."); if(!IsTesting()) { if(!IsDllsAllowed()) { Alert("Check \"AllowDLL Imports\" ON at menu Tools->Options->ExpertAdvisors!"); Print("Check \"AllowDLL Imports\" ON at menu Tools->Options->ExpertAdvisors!"); Comment("Warning: Check Parameter \"AllowDLL Imports\" ON menu Tools -> Options -> ExpertAdvisors!"); return (0); } } //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } int start() { if (OrdersTotal()==0) { if(profit>=0) { score+=hore; hore=0.03; if(max>maxo) { maxo=max; } max=0; b="menang"; } else if(max>3) { hore=0.03; max=0; return(0); } else if(profit Terkait:
|
![]() |
|
|