Help with static price, and alerts

#1
Hi Guys.....I am a new member, but a long time user of amibroker. I code basic strategies for my own..nothing fancy, so please bear with me if my queries sound to primitive.
I have the following code for my order entry. Im having the following issues.
1. When the price hits my Buy Condition, a price label is created on the chart which shows the price at that time. But then the price keeps on changing so long as the condition is true, even if its going higher and higher. The price on the label keeps on changing. How can i set it to show the price that was true at the first trigger? How do i assign it a static value?
2. I run this strategy on multiple timeframes..so i have 2 or 3 timeframes open at a time. But the alert output only shows alerts from the highlighted chart. Is there a way to make sure i get alerts from all charts that are running the strategy? Can i also run it on different symbols and get the alerts generated for each symbol?
Thank you for your help.
Code:
//======ORDER BUY AND SELL ORDERS BASED ON CONDITIONS DEFINED===========
Buy = BuyCDN; //
Sell = Low <= Ref(HaLow,-NumofBars);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

ActualBuy = ValueWhen(Buy, C);
ActualBStop = ValueWhen(Sell, C);

//===========CREATE PRICE LABELS ON CHART======================
dist = 2;
for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy@" + ActualBuy [i ], i, L[ i ]-dist, colorWhite,colorGreen );
if( Sell ) PlotText( "B-Stop@" + ActualBStop[ i ], i, H[ i ]+dist, colorRed, colorYellow );
}

//===========CREATE ALERTS TO SHOW IN ALERT OUTPUT===========================
TF = Interval(2);
AlertIf( Buy, "", TF+ " Buy at " +ActualBuy, 1, 1+2+4+8, lookback = 1);  
AlertIf( Sell, "",TF+" Buy Stop at " +ActualBStop, 2, 1+2+4+8, lookback = 1 );
 
#2
It depends on your buy and sell condition. If buy is break of a level.. then call it in as
ActualBuy = ValueWhen(Buy, break level);
 
#3
It depends on your buy and sell condition. If buy is break of a level.. then call it in as
ActualBuy = ValueWhen(Buy, break level);
Thanks a lot. Now I understand why its happening. However, that brings me to my next question.

I am using multiple indicators to create a Buy Signal. So its a combination of 2 different MAs + RSI + MACD.
That means that all 4 have to be true in order to trigger a buy signal. But obviously these 4 levels are broken at different times. And they could break in any sequence. So in such a case, how would I find the trade price, and make it stick on the chart?

Appreciate your feedback.
 

Similar threads