BTC USD 81,066.5 Gold USD 4,378.12
Time now: Jun 1, 12:00 AM

Sapa tau camna nak solve multiple order problem

Vondereich

CG Top Poster Club
gem
Messages
23,951
Joined
Jan 11, 2008
Messages
23,951
Reaction score
951
Points
176
Den ada guna etasoft forex generator ni nak buat ea..

Masalah dia, bila MA crossing, dia bukak sekali dua entri. Satu buy satu sell serentak..

Sblm tu dah mmg letak teknikal dia dan syarat2 dia cross. tapi on skali dua..

bila den tgk manual dia suruh letak if order does not exist la apa la. sama je.. sapa tau camna nak solve ??

Multiple Orders Problem
Let say you setup simple diagram with "On Every Tick" block having two branches. Each branch with a "Technical Analysis 2"
blocks to check for moving average cross up/down each having attached "Sell Order" or "Buy Order" to it. You are using moving
averages to check for cross on current bar. You expect to see single order open when cross happens.
Instead you are sometimes getting multiple orders open on what appears as single cross. This is usually called "multiple order"
problem. While this may seem like a defect in the EA, it is not. It is because of current value of moving average changing you are
getting multiple crossing signals for the setup that suppose to report only one cross up or cross down.
In other words, it is because of the way terminal works - current values are not "frozen", they are changing.
If you use current bar for indicator calculation understand that current bar is not "frozen" and it is changing all the time until new
bar starts to form at that point current bar gets frozen and is no longer changing. Same applies to Close, Low and High values. So
for example current Close, Low and current High are not fixed.
Because current bar is not frozen what you see on the chart as single "cross up / cross down" might be multiple cross ups and
cross downs. Therefore EA receives multiple "cross up / cross down" signals. From EAs point of view there have been multiple
signals (multiple cross ups or downs).
Now there are few ways to prevent multiple orders opening in this case.
You can:
1. Tell EA to check if there are other orders already open with that same OrderId and OrderType and then do not open anymore
orders if such already exists. This is usually done with "If Order Does Not Exist" block.
2. Tell EA to open new orders only once per bar. So if EA gets "cross up / cross down" signal it will open new order only once per
bar. This is done by placing "Once per Bar" block after your technical analysis and just before where you open new order.
 
Den ada guna etasoft forex generator ni nak buat ea..

Masalah dia, bila MA crossing, dia bukak sekali dua entri. Satu buy satu sell serentak..

Sblm tu dah mmg letak teknikal dia dan syarat2 dia cross. tapi on skali dua..

bila den tgk manual dia suruh letak if order does not exist la apa la. sama je.. sapa tau camna nak solve ??

Ada banyak cara nak adjust, plg senang masukkan sekali dgn candle atau harga, bid>MAval = buy, bid<MAval = sell.

Lepastu jgn lupa utk masukkan snippet utk hentikan looping order (ticket @ history check)
 
Last edited:
Atau cara lain,

Maval1 = iMA10
Maval2 = iMA200
if maval1>maval2 = buy
If maval1<maval2 = sell

Mcm ni pn blh.

err. ni den guna visual punya bos. tarik2 blok. takde coding..

guna etasoft forex generator..
 
ok dah boleh. kena letak dua blok . satu buy satu sell..

Sapa2 boleh convert jd mql sebab den guna yg biasa punya.. nak dpt script kena beli profesional punya.. dia bule generate ea je tk dpt script skali..

So kalau boleh korang letak la martingle ke.. Den try letak martingle tak jalan2..

boleh run mana2 tf dan pair
 

Attachments

need to re-code the EA kalo nak script .mq4 dia.. apa rules EA nie?
 
Ade sape leh bgtaw source nak belajar buat EA. Ingt nak master bab algorithm forex skali ngan buat ea.
 
Ade sape leh bgtaw source nak belajar buat EA. Ingt nak master bab algorithm forex skali ngan buat ea.

malaysian ni kedekut ilmu skit bos.. Semua makan sendiri

Den tgh cari coder dari indonesia tuk buat EA
 

Live Forex Chart

Currency
Rates
EUR / USD
1.14790
USD / JPY
156.877
GBP / USD
1.33950
USD / CHF
0.82250
USD / CAD
1.39985
EUR / JPY
180.080
AUD / USD
0.71320
Back
Top
Log in Register