Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code examples of multi instrument strategies?

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

    Code examples of multi instrument strategies?

    Let's say I have a super simple daily stock strategy-- I want to go long when the 20 day EMA crosses above the 50 day EMA, and go short when the 20 day EMA crosses below the 50 day EMA.

    Now here's the mutli strategy addition I'd like to add to it-- only go long when DELL is above its 50 day EMA, and only go short when DELL is below its 50 day EMA.

    Could you show me how to code this or at least point me to an example of a strategy coded that uses similar logic? I've read the tutorial on multi-instrument strategies, but I'd like to find a working example to go off of.

    Thanks.

    #2
    Hi Nick, thanks for your post.

    You can review the code of the per default installed 'SampleMultiInstrument' script.

    Then right click in it and save it under a new name, try gradually modify until it fulfills your needs.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    583 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    338 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X