User login

  

Common Functions

The following lists alphabetically general-purpose common PTL functions.

GetIndexSymbolGetStoredDateTimeValueIsMoreOrEqual
GetStoredBooleanValueGetStoredDoubleValueSendEmail
GetStoredCharValueGetStoredIntegerValueSetStoredValue
GetStoredColorValueIsEqual 

 

         

GetIndexSymbol

Returns index for symbol

Syntax

 int GetIndexSymbol( string symbol)

 

GetStoredBooleanValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

bool GetStoredBooleanValue( string keyName)

 

GetStoredCharValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

char GetStoredCharValue( string keyName)

 

GetStoredColorValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

color GetStoredColorValue( string keyName)

 

GetStoredDateTimeValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

datetime GetStoredDateTimeValue( string keyName)

 

GetStoredDoubleValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

double GetStoredDoubleValue

( string keyName)

 

GetStoredIntegerValue

Returns the value to which the specified key is mapped in storage, or null if the storage contains no mapping for this key

Syntax

int GetStoredIntegerValue

( string keyName)

 

IsEqual

Returns true if the first given value is equal to the second

Syntax

bool IsEqual( double x, double y)

 

IsMoreOrEqual

Returns true if the first given value is equal to the second

Syntax

bool IsMoreOrEqual( double x, double y)

 

SendEmail

Sends an email message containing the specified string with the specified subject to the specified email address.

Syntax

void SendEmail( string toAddress, string messageSubject, string body)

void SendEmail( string subject, string body)

Parameters

  • Body - String representing the body of the message to send.
  • messageSubject - String representing the subject line of the message to send.
  • toAddress - String representing the address to which to send the message.

Example

SendEmail("PTL function test", "subject", "test@test.net");

 

SetStoredValue

Associates the specified value with the specified key in storage.

Syntax

datetime SetStoredValue( string keyName, color value)

datetime SetStoredValue( string keyName, datetime value)

datetime SetStoredValue( string keyName, bool value)

datetime SetStoredValue( string keyName, char value)

datetime SetStoredValue( string keyName, int value)

datetime SetStoredValue( string keyName, double value)

Parameters

  • keyName - Represents the key for value
  • value - Value for storage

Example

SetStoredValue("myEUR", "1.714");   // str <- 1.714

 

 

12345