Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
i would like to ask some experienced programmer for a help with IOrders.
I have programmed simple strategy that should set profit target and stop loss by ExitLongStop and Exit longLimit. After entering a position, TP should be set 50 ticks above entry and SL should be set 50ticks bellow entry. Unfortunately when I apply strategy in a chart and position is entered, sometimes, the strategy omit exit orders, please see chart bellow.
ENTRY
IORDERS
LOG:
I am quite confused, since sometimes it set stop orders correctly, sometimes it ommits... :s
Could please somebody tell me what is wrong with the code?
Thank you
Can you help answer these questions from other members on NexusFi?
When i entered in the 1st trade, my exitorders were set according to ExitLimitLong and ExitLimitStops in block OnOrderUpdate. The problem was, when i entered in the 2nd trade and had still opened 1st position, i called again the same IOrders from OnOrderUpdates which have already set SL/TP for the 1st position, so that my exit orders were amended.
Also my entryhandlig was set as 100entries per direction
I changed entryhandling as i can be only in one trade in a time and then everything was ok.