Opening duplicate trades?

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Opening duplicate trades?

Postby Stance » Tue May 03, 2016 12:25 am

... ...
Last edited by Stance on Tue May 10, 2016 3:29 am, edited 1 time in total.
Stance
FXCodeBase: Initiate
 
Posts: 141
Joined: Mon Jun 01, 2015 4:34 pm

Re: Opening duplicate trades?

Postby Julia CJ » Wed May 04, 2016 10:01 am

Hi Stance,

It is quite possible that the tick will be there, the strategy sends an order to the server, the next tick will come before the confirmation comes from the server, and the strategy will send an order to the server the second time (having opened a position for the second time). Please control the situation "the order sent to the server, the second is not necessary to send".

Thank you.
Julia CJ
 

Re: Opening duplicate trades?

Postby Stance » Wed May 04, 2016 4:45 pm

... ...
Last edited by Stance on Tue May 10, 2016 10:13 pm, edited 1 time in total.
Stance
FXCodeBase: Initiate
 
Posts: 141
Joined: Mon Jun 01, 2015 4:34 pm

Re: Opening duplicate trades?

Postby Julia CJ » Thu May 05, 2016 2:44 am

Hi Stance,

Please wait the response for the opening of the order.

Code: Select all
local requestSent;
function ExtUpdate(id, source, period)
   if requestSent then
       return;
   end
   ...
   
function SELL()
    ...
    requestSent = true;
end

function ExtAsyncOperationFinished(cookie, successful, message)
    if cookie == yourSellCookie then
        requestSent = false;
        ...
    end
    ...
Julia CJ
 

Re: Opening duplicate trades?

Postby Stance » Thu May 05, 2016 3:03 am

... ...
Stance
FXCodeBase: Initiate
 
Posts: 141
Joined: Mon Jun 01, 2015 4:34 pm


Return to Discussions

Who is online

Users browsing this forum: No registered users and 7 guests