Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy Sell Quantities

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Buy Sell Quantities

    I seem to have managed to write a few trial startegies and they behave perfectly when I trial them and for real

    However now I have finalised my main startegy I seem to be unable to execute the required quantities automatically of sells and buys

    Basically I always have a position of being long or short whenever a crossover is achieved

    However whilst this works for a simple crossover strategy when it comes to my doing this live I find the position is just made flat and doesnt go from long to short and vice versa

    In other words whenever I am one future long it goes flat and whenever I am one future short it goes flat instead of going from long to short and short to long

    I have tried changing the startegy to manually placing it where it should be and aasking for 2 lots whenver a cross over is achieved but then I get an error where nothing is executed

    I have obviously made some erors in the relevant section of the coding but have tried playing around and cannot find a solution even though it does work when trialing other crossover startegies

    Any help would be much appreciated

    PS On my chart it shows 1 trade to close and one trade to go short or long but in reality it doesnt do this and merely nmakes the psoition flat so theoretically it is doing the right thing but in reality it is not. I am using Ninja Trader with Interactive Brokers if that is of any great significance
    Last edited by hdemet; 12-19-2011, 11:52 PM.

    #2
    Hello hdemet, I would suggest you read this article here from our helpguide closely first, as from your description it sounds like you're starting the strategy up not correctly 'in sync' :

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, Yesterday, 11:51 AM
    0 responses
    16 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    20 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X