Is a session active?

Share:

Description

Test to see if a session is active

Usage

1
2
3
4
  isActive(x, ...)

  ## S3 method for class 'TFXsession'
 isActive(x, ...)

Arguments

x

an object to test

...

other arguments for methods

Details

In order for a TFXsession to be active, it must have been authenticated less than 1 minute ago. If it was created with snapshot=TRUE it will become inactive after it is used once.

Value

logical

Note

This function assumes that if the session has not been used in 60 seconds is not active, even though TrueFX sessions actually stay active for roughly 70 seconds.

Examples

1
2
3
4
5
## Not run: 
sess <- ConnectTrueFX("GBP/JPY", username='JSTrader', password='Ou812')
isActive(sess) #TRUE

## End(Not run)