Ask and bid line from DDE mt4

#1
Hi , I am new to Amibroker and heave never used the formula editor successfully before.

I am streaming from metatrader 4 via DDE successfully and also using the import wizard successfully in this scenario.

Currently the bid shows up to the right hand side of the chart and flunctuates naturally without a line extending out to the left into the chart. By default this 'price' is in a grey box with writing. (see attached bid.jpg)

I am very new to writing or edting formula in amibroker. As I understand to record a number the formla would be something of either "Ask = "+GetRTData("Ask");or
Ask = "+GetRTData("Ask");or
"Bid = "+GetRTDataForeign("Bid"); or
Bid = "+GetRTDataForeign("Bid");

Alone these functions in the formula window give the errors :

Ln: 1,Col:27 : Error 32. Syntax error, unexpected IDENTIFIER.Is there semicolon missing at the end of the previous line? when not using the " at the beginning or

Ln: 1,Col:27 : Error 17. missing arguments when i do use the quatation at the beginning


My other solution was to attempt to create a charting drag and drop function (ie saving it to a drag and drop unction without the defualt locations of: drag and drop, custom, basic charts etc) using the formula given here: http://www.amibroker.org/userkb/2011/02/09/collecting-and-plotting-ticks/

Whilst this code saved ok on occassions i was only able to drag it to an existing chart with a price already on it without receiving errors. On no occassions did I chieve getting the Ask quotation or line to the right of the chart.

NB I have for my setting under DDE for MT4 the ask bid high low and time using {Field}!{Ticker}

Please could someone from the forum guide me as to how I could get a realtime bid and ask line that cuts across the chart from the right without plotting anything on the chart. Please see example from metatrader (attached)


when trying to drag the formula from the link above I get the error (attached)
 

Attachments

Similar threads