hello I' am a amibroker beginner. I 've spend a lot of time looking through the internet , but I didn't find nothing similar to this. So i gave up and decided to ask for help. Of the point: I want to create a afl code which would reflect CTOD intraday system ( Critical time of day)- p. 186[http://www.scribd.com/doc/7408934/the-compleat-day-trader-vol-i] . The assumtions of system :
- buy if 5 minute bar close above max from 2 hours after session start ( 5 minute close) - short if 5 minute bar close below max from 2 hours after session start (5 minute close) - buy works as both cover and opens new postiion - short works as sell and opens new postions Two different ways in two different systems closing positions 1) Close postion = time 16.06. ( few minutes before session close) or if RSI (15) cross "20" (sell) and "80" (cover) 2) Close if 5min bar close below/ above max/min from last one Hour. I have only something like this : // ForceCloseTradesAfter = 160600; Buy=Cross(C,Ref(HHV(C,24),-1)); // It should be better to replace HHV by Bar since or Value when ? Sell=Cross(Ref(LLV(C,24),-1),C) OR (TimeNum() > ForceCloseTradesAfter); // greetings Mateusz
