static public method terminal:alertMessage

Brief

Shows a alert (signal) message

Declaration
Lua
terminal:alertMessage (instrument, price, message, time)

Parameters
instrument

The name of the instrument at which the signal appears.

price

The price at which the signal appears.

message

The text message to show.

time

The date and time when the alert appears.

instance.bid:date(NOW) or instance.ask:date(NOW) can be used to get the date/time of the offer)

Details

Example [hide]

   function Update()
       ...
       if mySellCondition then
           terminal:alertMessage(instance.bid:instrument(), instance.bid[instance.bid:size() - 1], mySellMessage, instance.bid:date(instance.bid:size() - 1));
       elseif myBuyCondition then
           terminal:alertMessage(instance.ask:instrument(), instance.ask[instance.ask:size() - 1], myBuyMessage, instance.ask:date(instance.ask:size() - 1));
       end
       ...
   end

back