Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using OnMarketData in strategy entry logic

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

    Using OnMarketData in strategy entry logic

    I would like to reference the e.Volume as part of my strategy logic.

    i.e., if e.volume > x go long

    How can I have the onbarupdate read the onmarketdata e.volume?

    Thanks.

    #2
    Hello brucelevy,

    Thank you for your post.

    You would store it in a double and then call that double in OnBarUpdate. For example:

    In OnMarketData:
    Code:
    myDouble = e.Volume;
    In OnBarUpdate:
    Code:
    if (myDouble > myComparisonValue)
    EnterLong();

    Comment


      #3
      I've added it in but when I run the script I get an error that my computer has run out of memory. NT is the only platform running and I have a sufficient amount of memory installed.

      Comment


        #4
        Hello brucelevy,

        Thank you for your response.

        Please send us your log and trace files so we may investigate this matter further. You can do this by going to the Control Center-> Help-> Mail to Platform Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

        Please list 'ATTN: Patrick H - 1552628' in the subject line.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        182 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        334 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        258 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        358 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        187 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X