指定
Hello,
I want to create an EA that will work on using the extreme highest and lowest prices to predict the direction of the market and take bids towards the direction while also using additional input to identify bidding opportunities and which direction the bid should take.
So at beginning, the EA uses the start price which will be that CONTROL PRICE (CP) to identify the bidding zone, which will be adjusted once the market has stabilized with an Highest price-HP and Lowest price-LP positions. Once the market has stabilized with an HP and LP positions, then the CP will change from the Start price to the Middle price between the HP and LP. Thereafter the position of bid taking will depend on how the identified bid position is related to the CP, HP, and LP as well as the direction the market is moving from using the last extreme movements. So for major logic, all positions identified above the midpoint will be a BUY and below will be a SELL.
So as variables, we have the Bidding price positions (comprising of Maximum-MXBP and Minimum-MNBP), Bidding price position gap- used to determine the limit of bid taking opportunities, bidding distance BD- distance between each bid of same direction, in addition to HP, LP and CP. Please note that the Bidding price positions can be increased to up till the CP if CP will give opportunities for more bids, ie CP is lower than MNBP, or CP is Higher than MXBP.
So the steps will be as follows with the EXAMPLE below.
Variables defined
Start Price-SP=100, Bidding price-BP Gap= 5, bidding distance- BD=1, all other variables will be determined after EA activation using the price movements.
Actual Price -AP moves as follows= 100, 99, 97, 98, 95, 98, 90, 96, 85, 80, 87, 70
so using each move above, lets determine the other variables for each movement
AP 100, 99, 97, 98, 95, 98, 90, 96, 85, 80, 87, 70
HP 100 100 100 100 100 100 100 100 100 100 100 100
LP 100 99 97 97 95 95 90 90 85 80 87 70
CP 100 99.5 98.5 98.5 97.5 97.5 95 95 92.5 90 90 85
MXBP 105 104 102 102 100 100 100 100 100 100 100 100
MNBP 95 95 95 95 95 95 95 95 95 95 95 95
ACTION NA SELL SELL SELL SELL BUY NA SELL NA NA NA NA
EXPLANATION 1 2 3 4 5 6 7 8 9 10 11 12
EXPLANATIONS 1 Start position, same price for AP, HP, LP, and CP. MXBP is LP+BP=100+5=105, MNBP is HP-BP= 100-5=95. , while BD is 1. So EA will activate bids downwards using gap of 1 between bids for same direction until it reaches the limit of the MXBP and MNBP. And positions will then be determined by the CP
2, same trend but we now have a different HP, LP and CP, a SELL bid will activate at 99, being HP-BD=100-1=99, if price goes up (which it didn’t) from 99 to 100, then EA will activate a BUY at the LP+BD. Using the current HP and LP, the MXBP and MNBP will now adjust itself using the HP and LP compared to the BP. So at BP of 5, HP-BP= 100-5=95, and LP+BP=99+5=104. So we expect robot to focus on bidding opportunities between 104 and 95. While the CP will identify actions whether to BUY more or SELL more based on reflection of actual movements up and down.
3, LP now at 97, so SELL would have activated at 99, 98 and 97 using HP-BD. And other variables are calculated again based on conditions. Based on CP at 98.5, if price goes above it and reverts back, then it will SELL with higher lot size than previous bid at same position. Because the HP didn’t change and Lowest price is the last to change, so price is expected to continue downtrend as much as it didn’t reach or change the HP.
4. price went upwards to 98 from 97 and may activate a Buy using LP+BD=97+1=98. but if price falls down to below 98 and above current lowest of 97, it can take more SELL for market to get out of existing range. Ie below 97. If price goes above CP from the lowest price and reverts back downwards, the EA should adjust itself to take more SELL bids towards the market direction.
5. Price reverts downwards to 95 which is our MNBP target. As a result, EA fixes the MXBP and MNBP at 100 and 95 and so if price reverts back within this range and goes out again, it will take more bids towards the direction of market ie BUY if it goes upwards or SELL if it falls downwards. While also comparing to CP position. However, if CP falls below 95, EA can still take bids towards the direction below 95 until it reaches the CP. And same as if price goes upwards as well.
Take profit and Stop Loss conditions can also be considered as well in the input.
CHART OF BID POSITIONS USING DATA ABOVE.
HP AND MXBP BECAME SAME POSITION FROM POINT 5. SO BIDS CAN STILL BE TAKEN AS A SELL DOWNWARDS FROM MNBP TO CP IF PRICES GOES UP AND REVERTS BACK DOWNWARDS, WHILE STILL USING THE BD TO TAKE THE BIDS.
So EA will indicate date and time of Highest price achieved and also of Lowest price achieved
Further clarifications can be made if need be.
Only serious and available traders should apply.
Source code will be given at end of projet