Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-instrument script problem

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

    Multi-instrument script problem

    I have single instrument scripts I have programmed (not from the wizard, but by hand). They work just as I expect. I then created a multi-instrument script. This works just as I expect, but only for certain trading combinations. I have 3 instruments:
    1) The base instrument - BarsArray[0]
    2) The long instrument - BarsArray[1]
    3) The short instrument - BarsArray[2]

    This configuration works just as expected. The base is used just for signals, the long is for going long, the short for going short. Note that I exit the long and go short at the same bar (and vice/versa).

    Then I wanted to have this configuration:
    1) The base instrument - BarsArray[0]
    2) The long instrument - BarsArray[1]
    3) The 2nd long instrument - BarsArray[2]

    So I used the same code but changed the EnterShort for the BarsArray[2] instrument to an EnterLong. The same for the exit. In that case I never can enter the BarsArray[1] instrument long! I speculate that it is not until the bar actually closes that I get the buy/sell so it thinks there are two positions long at the same time? I believe it is something like this. Any thoughts?

Latest Posts

Collapse

Topics Statistics Last Post
Started by argusthome, 03-08-2026, 10:06 AM
0 responses
88 views
0 likes
Last Post argusthome  
Started by NabilKhattabi, 03-06-2026, 11:18 AM
0 responses
48 views
0 likes
Last Post NabilKhattabi  
Started by Deep42, 03-06-2026, 12:28 AM
0 responses
30 views
0 likes
Last Post Deep42
by Deep42
 
Started by TheRealMorford, 03-05-2026, 06:15 PM
0 responses
34 views
0 likes
Last Post TheRealMorford  
Started by Mindset, 02-28-2026, 06:16 AM
0 responses
68 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X