Tarea técnica
Bot rules
Bot has simple previous candles break
It will look back from the start trading time at the candles that have closed and use the high or low (or separate function for open and close prices )
- with reverse at entry point if hit after set amount of points in profit
If set to high and low breaks it will use the highs as sells and lows as buys ( will have a function that will say “reverse entries” if this is turned on it will buy at candle highs and sell at candle lows )
Bot settings :
Magic number
Timeframe: (meaning which candles you’re using to use breaks)
If set to 5 min it’ll be using 5 min candles , if set to 15 it’ll use 15 minute candles
Reverse at entry level after set amount of points in profit (true or false) : if this is true it will reverse at entry level after set amount of points in profit so if that set amount is 1000 and entry was 42100.00 and a buy is activated and got to 1000 points in profit it will instantly place a SELL STOP at the same level as entry of current trade that is in profit . If it reverses it will activate the sell and will have separate setting that will determine if it keeps the current trade with the opened TP, SL, BE , and TS. That setting is next.
Close current trade at reverse (true or false) : if set to true it will reverse the current trade and close current trade and keep new one opened , if set to false it will keep the 1st initial entry opened with the set TP, SL, BE, and ST settings . Example: if there is a buy and reverse trade is set to reverse at 1000 and a buy opens and hits 1000 points in profit it will instantly place sell stop at entry price if that price is hit again after 1000 points in profit and the close current trade at reverse is false it will have both buy and sell opened but if close current trade at reverse is true it will instantly close when opposite trade is OPENED , only when opened it will then close the initial entry . Let me know if you need video example.
Look back candles (true or false ) : if set to true this setting will count the amount of candles that it will look back to calculate levels , meaning if set to 1 it will STRICTLY ONLY LOOK BACK 1 candle for the high or low or open or close prices , if set to 5 it will use the 5 precious candles as levels but remember this is NOT COMBINED it means it will look at the 5 previous candles back to see what low , high is closest to current price form the 5 last candles (if you need example please let me know I can show you videos ) if this is set to false it will simply use every single candle BUT ONLY FROM START TRADING TIME FOR THE DAY , IT WILL NOT USE PREVIOUS DAY CANDLES , it will reset everyday
3 separate entries all with these settings and with true and false to be able to turn each one on or off
• Lot size = 1
• TP Points = 500
• SL (true or false ) Points = 50
• Use Trailing = true/false
• start trailing at points = 500
- trailing step (points ) = 50
- Use break even= true/false
- Break even at points : 200
- Extra points for break even = 20 (this is to secure profits for break even settings so if set to break even at 200 points and with extra points at 20 it’ll set break even at 20 points in profit when 200 points in profit
Extra points for entry (true or false) : if set to 50 it’ll set entry 50 points extra from the original entry if -50 it will be negative 50 points from entry, example: if price is 42100.00 and extra points is set to -2000 it will place the pending order at 42080.00
Max loss for the day (true or false): ( if set to 1 it’ll stop trading after 1 loss for the day )
Max win for the day (true or false): (if set to 1 it’ll stop trading after 1 win for the day )
Max sells opened at a time (true or false ): if set to 2 it will only have max 2 sells opened at a time , this doesn’t include pending orders.
( this is to avoid too many opened sells or buys at a time) *** note if it’s set to 2 and 2 opened trades are opened it will then fleet all pending BUYs until 1 or both trades are taken out to then enter more buys. ***
Max buys opened at a time (true or false): same rules as max sells opened at a time , *** note if it’s set to 2 and 2 opened trades are opened it will then fleet all pending BUYs until 1 or both trades are taken out to then enter more buys.***
MA SETTINGS (true or false): ( if set to 4h 200ema and price is above the 200 ema on 4h then the bot will only take valid buy entries and vice versa for sells )(should have option to choose from simple , exponential, smoothed or linear weighted)
Vwap filter (true or false): ( same rules as EMA setting above )
RSI filter : (true or false) if it is set to 1H 51 over bought and 49 over sold it means it will only look for for sells after it passes or on the the 51 RSI and will only look for buys after it passes or on the 49 RSI.
Increase lot size after these amount of consecutive losses (true or false): (if this is at to 9 it’ll wait for every 9 consecutive losses to increase lot size if set to 2 it’ll increase lot size by set amount every 2 losing trades ) example : if the setting is set to 9 it will only increase lot size by set amount after 9 consecutive losses, lets say initial lot size was 2 lots, after the 9th loss it will increase the lot size by set amount (if set amount is 2) it will increase lot size to 4 after the 9th loss and will keep it there until 9 more consecutive losses so at the 18th consecutive loss it will then increase the lot size to 8 and so on . It will reset only after it takes a profit and if max lot size allowed by broker due to margin it’s hit and can’t increase make sure you add to the code that it will keep at max lot size possible until it takes a winning trade then resets to original lot size .
Increase lot size % after losses : (true or false) so if set to 2 it’ll increase lot size by 200% after the set amount of losses , if set to .20 it will increase the lot size by 20% .
——-
Increase lot size after consecutive wins: (true or false) same rules as consecutive settings. Example, if set to 2 it will increase lot size after 2 consecutive losses, so if original lot size is 2 and has 2 consecutive wins after the 2nd win it will increase lot size by set % and reset after losing trade.
Increase lot size % after losses (true or false ): same rules as % increase after losses but keeping in mind the next setting which is called reset after set amount of wins.
Reset after set amount of wins (true or false) : if this set to true and 4 it will reset to original lot size after 4 consecutive losses
two time filters (true or false for both )
Start trading 16:30
Stop trading 18:00
Start trading 21:00
Stop trading : 23:00
Close all pending and opened orders at stop trading time : true or false (* if set to false it’ll keep OPENED trades ONLY PAST the stop trading time , if set to true it’ll close all pending and opened orders at stop trading time.
Key notes :
• bot will only use the same day levels from start trading time .
Can send you current bot that has similar function but code needs to be more clean