Announcement

Collapse
No announcement yet.

EFS Backtesting apply formula only during certain hours - how?

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

  • EFS Backtesting apply formula only during certain hours - how?

    Hi all,

    I've spent a lot of time on searching for answers to my questions on the esignal site, KB and the forums and must say that it's extremely hard to find basic stuff an the information seems to be scattered all over the place. Is there a definitive place to go for EFS functional reference that contain searchable category of calls that are available to developers? For example if I wanted to get the open time of an historic bar in the Strategy tests - where would I look for an answer? I know that I can use Javascript Date and related methods to get the current date, time, etc. but how do I get the open time of a specific bar in the chart that's part of my backtest? I'm looking to run the formula only on candles starting from open of the trading hours and ending at the close of market.

    Any help will be greatly appreciated.

    Thanks,

    ET

  • #2
    ET
    You can use getValue(“Time”) to create a Date Object of the bar time and then use the methods of the Date Object to retrieve the date, time etc
    You can also use the day(), hour(), minute() etc functions to retrieve the date and time of a bar
    If you search this forum you will find several threads on this topic and also on what you are trying to do as they have been covered before
    Alex

    Originally posted by esigtrader View Post
    Hi all,
    I've spent a lot of time on searching for answers to my questions on the esignal site, KB and the forums and must say that it's extremely hard to find basic stuff an the information seems to be scattered all over the place. Is there a definitive place to go for EFS functional reference that contain searchable category of calls that are available to developers? For example if I wanted to get the open time of an historic bar in the Strategy tests - where would I look for an answer? I know that I can use Javascript Date and related methods to get the current date, time, etc. but how do I get the open time of a specific bar in the chart that's part of my backtest? I'm looking to run the formula only on candles starting from open of the trading hours and ending at the close of market.
    Any help will be greatly appreciated.
    Thanks,
    ET

    Comment


    • #3
      Thanks

      Thanks Alex,

      I did find the answer and it worked as I expected.

      _esigtrader

      Originally posted by ACM View Post
      ET
      You can use getValue(“Time”) to create a Date Object of the bar time and then use the methods of the Date Object to retrieve the date, time etc
      You can also use the day(), hour(), minute() etc functions to retrieve the date and time of a bar
      If you search this forum you will find several threads on this topic and also on what you are trying to do as they have been covered before
      Alex

      Comment


      • #4
        esigtrader
        You are welcome
        Alex


        Originally posted by esigtrader View Post
        Thanks Alex,

        I did find the answer and it worked as I expected.

        _esigtrader

        Comment

        Working...
        X