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)
Saying it doesn't do as it should doesn't help much. We need to know exactly what it does and doesn't do.
It'll help greatly if you get into the habit of putting Prints in your code while developing. I suggest you put a load of Prints in, printing out various variables to see their value. You should also put the line
in your Initialize method, then you will see what stops, targets and entries are being generated. Then, after you've looked at the output in the output window, if you can't figure it out, post the output and the code here.
Can you help answer these questions from other members on NexusFi?
Thx for this Xeno. I've attached 2 jpegs from the same chart, same code etc. In 1, the code works fine; 3 longs are executed, , lots 1 & 2 reach targets & the stoploss moves up accordingly and is eventually hit.
In the other eg, same thing - 3 lots entered long (correct) 1st target hit, then it seems only the 2nd lot moves to b/e, the 3rd remains & is hit as an original stop loss. What I am trying to achieve is that 3 lots are entered, once 1st lot hits target, remaining 2 stop losses move up to b/e. Then, as 2nd target is achieved, the 3rd lot remains @ b/e still & does not move.
I am quite close & have set trace=true as you suggested. I am missing something obvious I think.
Seriously, the time you put in to work out how to use 'if' and {} and other basic constructs will be invaluable. You can't really program without that knowledge. You can come on here and keep asking, but ultimately it'll get frustrating.
Thx, Xeno I'll have a look. I'm not sure how much programming I really want to do we shall see. I currently run a fund that uses MT4 servers; I just jumped into NT to have a look as I thought I could test some of my own ideas. The jury is still out for the moment. I tend to focus more on the ideas rather than the complete implementation.
In the meantime, if you feel so inclined can you see any obvious errors that might clear up this problem; scaling out of orders is a fairly standard method & I think it is nearly correct. Appreciate the assistance it has taken a while to get there.
BTW, don't expect Australia to improve much in this series, I don't think anyone is expecting them too here.
Well, I already told you that not having {} after your ifs is probably not want you want. I don't see anything else obvious, but us programmers tend to use prints. Computers are so much better at running code than your head.