--- In amibroker@yahoogroups.com, "Mohammed" <[EMAIL PROTECTED]> wrote: > > I'm using this formula to plot arrow. > > CrossUp = Cross(C,PeakOneLine); > PlotShapes( CrossUp * shapeUpArrow, colorGreen ); > > How can I show only last arrow? >
You may want to consider your code as a full strategy that is backtestable instead and use the backtester Auto Analysis tool to draw the up/down arrows for you. That way you can show all trades, all raw signals, or just any given trade arrow pair. For example, replacing your code above to this can achieve somewhat the effect you may want (I added a Sell rule for you for illustrative purposes of effect I'm about to show you): Buy = Cross(C, PeakOneLine); Sell = C < MA(C, 50); Short = Cover = False; Now, go to AA tool (most effective if you put this window in different monitor - get to this later), choose your AFL file appropriately, run Backtest against your symbol. You have 3 options for displaying up/down arrows at this point: 1. All raw signals (labeled "Show arrows for all raw signals") 2. All trades (labeled "Show arrows for actual trades") 3. Current trade (labeled "Show current trade arrows") Select option 3 for your case (3rd item down in right click context menu). Now, as soon as you selected option 3 from AA tool, you should notice the arrows on your price chart window (on different monitor is best to see this effect). Latest version of AB should auto-scroll the chart such that you can see this arrow for any trade you want without having to move the horizontal scroll bar to find the arrows (a feedback item that Tomasz responded too). Your original code above would be similar to choosing option 1. Regards, JD