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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X