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)
Yeah I have been working my way through the help file. It is a ton of information to wrap my head around but I am trying!
I have added print statements to my code so it looks like this:
When I look at the output window as the code works I get this:
So in that instance the price was above the SMA, at 5 ticks above it went long(which is good!) the output window keeps coming up with this over and over again
Which would mean to me that it keeps getting an order spammed at it that it cannot fill. When in reality all I would like is for it to do nothing until the price moved to 5 ticks below the moving average and have it reverse and go short then.
So basically right now it will do the first entry correctly but it will not reverse for me! :/
Anyways I will keep at it. seems like its a fairly decent sized learning curve but hopefully worth it once I figure it out!
Can you help answer these questions from other members on NexusFi?
You will see that the first parameter needs to be a DataSeries object, not a double. The expression
GetCurrentAsk() + (Offset * TickSize)
evaluates to a double, not a DataSeries. I'm surprised your code even compiles! NT's syntactical leniency is the cause of your headaches.
Personally, I've had problems getting these cross methods to work for me sometimes, maybe I was using them incorrectly, but a long time ago I decided to never use them. Now I do something like "if x > y and x wasn't > y in the last bar" logic to determine crosses above.
So if I was to use the Close instead of the ask (not sure why you're using the asking price) it could be