Help with defining a price rang and placing pending order based on that pls :)
-
I am trying to create a trading bot that can identify a price range, say from 1pm till 5pm, figure out the price range (so the high minus the low, for example the result being 15 pips), and then be able to plot a pending order 15 pips above and 15 pips below.
I have made a start but the bot is not able to place trades when I export it and try it on mt5.
Can someone pls check over my logic for this and let me know, this is how far I have gotten: https://fxdreema.com/shared/ty8NZkfMb
-
I realized I had some major mistakes in some part so here is a more correct version: https://fxdreema.com/shared/DiCNcoOT
-
If you need to program two pending orders at the exact same distance as the high and the low of the price range, why do you need the price range in the first place?
-
The main reason is that the price range happens during the night time for me and I would like to have an automated bot for it. Also the price range would of course be different every day. So for example on Monday price range is 20 pips so pending should be placed 20 pips above and below the range and Tuesday is 10 and the pending would be placed 10 above and below the price range.
-
The price range is what the pending will be based on
-
Worked on it some more today, got it working till an extent. But my main question now is when I have a formula that looks at the highest and lowest price in a range does it take into account the wicks or does it only look at bodies?
Most up to day version: https://fxdreema.com/shared/YAIGuvxwc
-
Only highs and lows are considered, ie, wicks are always considered not bodies.