I use somewhat envelope system with bollinger bands and am now puzzled how to programm this:
phase 1
when two bands cross upward or downward I want the system to wait for a buy or sell market signal
phase 2:
then turn to tick data checking them with moving average being calculated from tick data realtime and then entering for market price when tick price equals (or is half pip from MA).
more detailed description:
I want the bands to be calculated from close prices (to be sure bands crossed), when the system after certain bar close price finds out the signal is there (bands crossed the good way signalling we should wait for good entry price) then I want the script to be watching tick data (not from close prices) and comparing them with SMA (6), and when script sees market tick data are half pip from MA6 then enter the good direction (there should be one more trend checking filter here calculated from close prices) at market price.
Please advice me how to handle first the signal from close prices (if they cross and bar is not closed, I am not interested, it is a no signal for me) and then when it happens how to start checking the tick data entering then for the price of moving average (being calculated from the tick data realtime during a bar being drawn).
with correct direction.
Thank you very much in advance!
N.
Comment