Calling an indicator on certain specified times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #135708 quote
    snuckesnucke
    Participant
    Veteran

    Hi!

    I want to use VWAP in a strat on DAX30 but since DAX30 does not give any volume at certain times i get a division by zero error and the start stops from pro order.

    So i wonder if someone can help me with only calling the vwap indicator for example between 03.00-22.00, is that possible?

    d = max(1, intradaybarindex)
     
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    if(intradaybarindex=0) then
    endif
     
     
    if vwap>vwap[1] then
    color = 1
    else
    color = -1
    endif
     
    RETURN VWAP coloured by color STYLE(LINE,2) as "VWAP"
    #135765 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Yes, in the CALLing strategy use:

    IF Time >= 030000 AND Time <= 220000 THEN
       MyVWAP = CALL Vwap
    ENDIF

    you can use OpenTime, instead of Time, as it best suits your needs.

    I wrote “CALL Vwap” assuming the name is VWAP, but it can be any name.

    AlgoAlex and snucke thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Calling an indicator on certain specified times


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
snucke @snucke Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
6 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/12/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...