Saving a fixed price point while the trade is live

#1
Hi guys,

I am stuck in amibroker with leaving a value fixed while the trade is on.

I have a moving average crossover point that I use as a sell zone. When a buy is triggered via two MA cross over that becomes my exit point. And when the low of a price crosses that line my trade exits.

Problem is as price moves about there would be multiple MA crossovers that invalidates the initial sell zone I marked.

I would like to know if there is a way to leave that value fixed while the trade is live.

Thank you.
 

trash

Well-Known Member
#2
Hi guys,

I am stuck in amibroker with leaving a value fixed while the trade is on.

I have a moving average crossover point that I use as a sell zone. When a buy is triggered via two MA cross over that becomes my exit point. And when the low of a price crosses that line my trade exits.

Problem is as price moves about there would be multiple MA crossovers that invalidates the initial sell zone I marked.

I would like to know if there is a way to leave that value fixed while the trade is live.

Thank you.
Well, preferred close is a confirmed close.
So you use delay

Buy = Cross(C, MA(C,20));
Buy = Ref(Buy, -1);
Buyprice= Open;
 

trash

Well-Known Member
#4
Hi trash,

Thanks for your reply. Unfortunately I don't quite follow.. can you please elaborate ?

Thank you.
Ref sets a delay so in this case it waits till cross bar is finished and then enters on next bar after finished cross bar. As far as I understand you wanna avoid the dozens true/false conditions if cross bar is in the making.
 

Similar threads