Not sure if this is all ok but heres a report....
Ref(C,-1)<O AND Ref(V,-1)> (2*Ref(Mov(V,13,E),-1)) AND C>Ref(C,-1) AND ( Ref(H,-1)-Ref(L,-1))< Ref(Mov(H-L,13,E),-1);
This is doing my head in!!!!
I can't get it to buy on the next bar after the insidedaycond.
It keeps buying on inside bar 1.....
Enough for tonite...my GF and i have been trying to figure it out....she's catching onto AFL faster than me.
Cheers,
Can,
You may have got this solved by now, but as far as I can see, the reason that you think that you are buying on the wrong bar is because of the position of the arrow in your chart (which I presume is generated with a plotshape command). If that is the case, the arrow in the chart would indicate when the buy criteria is triggered, which is a different kettle of fish to when the trade will actually take place.
This is where lesm's comment regarding the settradedelay command comes in.
SetTradeDelays( 1, 1, 1, 1) implies that you physically enter the trade (long) one day after the buy criteria is triggered and similarly exit the trade one day after the sell criteria is triggered.
In order for you to actually see when the trades physically take place, you need to back test the strategy, whereupon you will receive a trade list. Select any of those trades in the tradelist, right-click any trade and select "show current trade arrow" and you'll see exactly when the trade was entered into and exited from -- which should be exactly as per your expectation.
Just to take this discussion a little further, if you were to implement Nicks strategy with a one day hold, there are several ways to implement that in Amibroker, but I have found that the easiest is simply to set the sell signal to be the same as the buy signal, but set the sell trade delay to 2 days, ie.
SetTradeDelays( 1, 2, 1, 1);
buyprice=open;
sellprice=open;
buy = .....
sell = buy;
That way, your system is set to enter the trade one day after the buy criteria (on the open) and exit the trade the next day (also on the open)
PS, You're doing a great job - keep it up. Others will try to chip in whenever they can.
wouldn't you rather want to base your exits on something other than a one day hold?
I thought that swing trading was used to catch the move up or down of a stock over several days and at the first hint of failure of the stock to perform to it's potential is when your exit stratagey would kick in and take you out of the play be it 1 day or 1 month.
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.