About Closing Position

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

Moderator: admin

About Closing Position

Postby Ryourjj » Sat Apr 30, 2016 8:30 am

About Closing position

Hi,
I have some problems with the closing of position.
I try to open the position with BUY() and close the position with BUY_LIMIT.
However, I encounter the position is close on the opposite side.
i.e: The Sell position is closed (First Buy order executed) and an opposite position (Second Buy order executed) is opened concurrently.
Thanks all.
Attachments
FU.png
Description about the trading logic
Candle Strategy.lua
Candle Strategy
(22.97 KiB) Downloaded 788 times
Ryourjj
 
Posts: 4
Joined: Sat Mar 26, 2016 1:13 am

Re: About Closing Position

Postby Apprentice » Sun May 01, 2016 9:45 am

You are using period=period-1;
This will delay all transactions for a period.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Discussions

Who is online

Users browsing this forum: No registered users and 16 guests