Hi,
I would like to create a condition that entry shall only occur if price goes through a set level. E.g.
If the price in this particular market is currently 4670 i would take it crossing through 4700 as a buy signal. This would adjust as the price moved up and down. For instance if price moved to 4750 then the price ceiling to enter would be 4800. If it crossed through 4700 back down this would be a sell signal. In this case obviously the numbers are multiples of 100 but could be 200, 500 etc.
I want to use this in a backtest so the price levels would have to adjust to the current trading price.
Does anyone have any ideas on how i can code this? Any pointers would be extremely helpful.
Thanks
I would like to create a condition that entry shall only occur if price goes through a set level. E.g.
If the price in this particular market is currently 4670 i would take it crossing through 4700 as a buy signal. This would adjust as the price moved up and down. For instance if price moved to 4750 then the price ceiling to enter would be 4800. If it crossed through 4700 back down this would be a sell signal. In this case obviously the numbers are multiples of 100 but could be 200, 500 etc.
I want to use this in a backtest so the price levels would have to adjust to the current trading price.
Does anyone have any ideas on how i can code this? Any pointers would be extremely helpful.
Thanks