GAP Trading
-
Hi. I am having difficulty with trying to create a bot for GAP trading. I have attached a pic of the current bot and also the results. It seems to just buy and sell randomly. Is there a way to have it open a buy sell when the price gaps up or down a certain amount ? I have indicated on the second picture where it should have bought only. I guess it must be trading even when the gap is a decimal of a pip.


-
Your logic is not checking whether there is already an open position or not, and will, therefore, trade on every bar that has opened at a different price form the previous bar.
Since you also don't specify any timeframe, it will trade several times a day. if you want daily gaps, you have to tell it to the algorithm.
