[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] How do I keep the buyprice while multiple buy signals happen



PureBytes Links

Trading Reference Links

Hello,

This should be the simplest thing and I am simply running in circles 
with AFL not being able to give me what I want.
Here's what I want in simple terms:

?	Buy on MACD crossing (buy at Open the following day).
?	Sell at 3% profit or at 10% loss.

Period. That's all.

The problem I am having is in "keeping" the purchase price at hand. 
Yes, I know about "ValueWhen" function, but I can't get it to work 
because I can easily have multiple buy signals before the sell 
occurs and a new Buy gives me a new BuyPrice that throws off all my 
profit and loss targets.
Please advise. Thanks,

Andre Perman