BTC USD 84,018.3 Gold USD 4,285.46
Time now: Jun 1, 12:00 AM

PDF Cara-cara Membuat EA.

bagus juga belajar cara buat EA..boleh automate teknik trading anda..
biggrinn.gif
 
apa beza floating dengan profit?

salam bro, cemana nak ubah ea ni supaya open post cuma satu je? setting lain cantik dah cuma dia op non stop.

//+------------------------------------------------------------------+
//| JMBUYERv2.mq4 |
//| Copyright © 2008, PRMQuotes Software Corp. |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, PRMQuotes Software Corp."

#include <stdlib.mqh>
#include <WinUser32.mqh>

//+----------------------------------------------------------------------+
//| To modify Lotsize of script change value listed here, right now |
//| its set to 1.0 change that value if you desire different lotsize |
//| I have found that it is important to keep the decimal in place, |
//| but really dont know why yet, but fractional lots work too (ex... |
//| 0.1, 0.3, 1.12), you get the picture. |
//| AGAIN DONT FORGET TO SAVE AND COMPILE AFTER MAKING ANY MODIFICATIONS |
//+----------------------------------------------------------------------+
extern double Lots = 0.10; // change this number to change the lotsize
extern double stoploss = 100; // change this number to change the stoploss
extern double takeprofit = 100; // change this number to change the takeprofit

//+---Don't forget to save and compile after changing the Lotsize--------+

//+------------------------------------------------------------------+
//| Each of the following lines produces an individual order |
//| 3 lines produces 3 orders, to increase or decrease the number |
//| of individual orders either add, or take away identical lines |
//| within the parenthesis. Again dont forget to save and compile |
//| time you modify the code. |
//+------------------------------------------------------------------+
int start()
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0,CLR_NONE);
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0,CLR_NONE);
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0,CLR_NONE);
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0,CLR_NONE);
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0,CLR_NONE);

**

//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
 
dalam start takde condition, terus letak OrderSend memanglah dia akan terus menerus open pos.

Contoh simple kalau nak 1 pos

if (OrdersTotal() < 1)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);

**

Tapi kalau pos tu dah close, dia akan automatik masuk pos baru, jadi condition tu kena pandai2 ubah, selain OrdersTotal(), mungkin ea baca indicator lain sebagai filter
 
dalam start takde condition, terus letak OrderSend memanglah dia akan terus menerus open pos.

Contoh simple kalau nak 1 pos

if (OrdersTotal() < 1)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Bid+takeprofit*Point,"JMBUYER",0,0, CLR_NONE);

**

Tapi kalau pos tu dah close, dia akan automatik masuk pos baru, jadi condition tu kena pandai2 ubah, selain OrdersTotal(), mungkin ea baca indicator lain sebagai filter

tq masta. pasal automatik pos baru tu xde hal.lepas op kasi buang terus dari chart:D

den dah agak mesti command nya kat situ:) cuma x tau bahasa mq4 ni.
 

Latest Posts

Live Forex Chart

Currency
Rates
EUR / USD
1.13910
USD / JPY
157.285
GBP / USD
1.32505
USD / CHF
0.82827
USD / CAD
1.41455
EUR / JPY
179.163
AUD / USD
0.70328
Back
Top
Log in Register