İş Gereklilikleri
I'm currently an owner of a GTM EA/TOOL (MT5) and I have been using it to trade Boom and Crash Indices. The EA has worked well for one directional trading but when an index spikes up (Boom index) or down (crash index), it results in losses because following stops are not being honoured when prices crash or boom. I have identified an indicator (RSI) that will help minimize getting into such losses and take advantage of the spikes.
The following is how i have been trading boom and crash indices:
1. Boom/Crash Index
· I activate one directional trading in a sell, using the minimum lot size of 0.2 and a grid size of 100 points (this equates to a single 1 minute candle price movement). The GTM (MT5) cashes in at every candle closure and opens a new trade for each candle.
· However, every time the index spikes up, the open trade results in a negative trade and if it continues to spike up, a new negative trade will be created at every spike. I tried limiting the number of open deals at a time but eventually those open negative deals will end up in huge losses if spikes continue. For a crash index, the exact opposite occurs.
· The RSI indicator can help determine when a price will boom (spikes up) or crash (spikes down). Every time the RSI reaches an overbought region for a Crash index, the price spikes down and when it reaches an oversold region for a boom index, the price spikes up.
I therefore would like you to assist me by incorporating the RSI indicator into the GTM (MT5) as follows:
1. Crash index
· In the sell leg of the GTM, incorporate the RSI indicator such that i can input a level and period as a condition to open sell trades at every candle close/open when the RSI reaches an overbought region at a specified level and period.
· The GTM should be allowed to open buy trades automatically without the influence of RSI conditions but should stop opening buy trades and close any open buy trade once the RSI reaches the overbought region, but should continue buying once all the sell trades have been closed or after every spike.
· The buy leg of the GTM must have one RSI level that can be turned off by entering a zero value.
2. Boom index
· In the Buy leg of the GTM (MT5), incorporate the RSI indicator such that I can input a level and period as a condition to open buy trades at every candle close/open when the RSI reaches an oversold region at a specified level and period.
· The GTM should be allowed to open sell trades automatically without the influence of RSI conditions but should stop opening sell trades and close any open buy trade once the RSI reaches the oversold region, but should continue selling once all the buy trades have been closed or after every spike.
· The sell leg of the GTM must have one RSI level that can be turned off by entering a zero value. The RSI indicator must not use two levels (Overbought and oversold) at the same time only one level should be active at a time.
3. Illustration of GTM EA trading the 1000 Crash Index
4. Current GTM coding guide as per the E user guide (attached)
//+------------------------------------------------------------------+
//| GTM EA.mq5 |
//| LN Thomas
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "LN Thomas"
#property link "https://www.mql5.com"
#property version "1.00"
//---Trading vs Planning Mode
input Startup & Operational_mode[dropdown]= "Grid trading & Planning mode/Planning mode only (No new trade entries)";
//---Combined_profit_and_risk_settings
//---Closure_at_profit_level
//--- input parameters
input int Target_profit_amount[0:Off]=500;
input float Target_profit_pips[0:Off]=0.0;
input int Target_profit_percent_of_balance_at_start[0:Off]=0;
//---Closure_at_loss_level
input int Max_loss_amount[0:Off]=0;
input float Max_loss_percent_of_balance_at_start[0:Off]=0.0;
input int Max_loss_pips=0;
//---Closure_at_price_level
input float Close_grid_on_or_above_price=0.0;
input float Close_grid_on_or_below_price=0.0;
//---Balance_of_Buy_and_Sell_grid_trades
input int Max_Gap_of_buy_and_sell_open_trades=0;
input int Max_Gap_resolution[dropdown]="Trade with trend Only/Prune highest loss trade";
//---Position_sizing
input float Equity_amount_reserved_for_this_EA[>0]=0.0;
input float Max_drawdown_allowed_percent[>0]=30.0;
input int Position_sizing_method[dropdown]="Manual lot size/Pecent of EA Euity/Percent of EA Balance";
input float Position_risk_percent[>0]=0.0;
//---Buy_grid_settings
input int Buy_grid_trading_allowed[select]="Enabled/Disabbled";
input float Buy_initial_entry_price[0:Off]=0.0;
input float Buy_manual_lotsize=0.0;
input int Buy_gap_size[>0]=0;
input int Buy_stoploss_pips[0:Off]=0;
input int Buy_takeprofit[0:Off]=0;
//---Buy_counter_trend_scaling
input int Buy_counter_trend_scaling_after_grid[0:Off]=0;
input int Buy_counter_trend_scaling_percent[0:Off]=0;
input int Buy_counter_trend_lot_scaling_down[0:Off]=0;
//---Buy_trading_boundary
input float No_new_buy_on_or_above_price[0:Off]=0.0;
input float No_new_buy_on_or_below_price[0:Off]=0.0;
//---Sell_grid_settings
input int Automatic_vs_Manual_sell_settings[select]="Automatic sell settings:copied from Buy(ignore sell fields)/Manual sell settings:Fill in sell fields below";
input int Sell_grid_trading_allowed[select]="Enabled/Disabled";
input float Sell_initial_entry_price[0:Off]=0.0;
input float Sell_manual_lotsize=0.0;
input int Sell_Gap_size[>0]=0;
input int Sell_stoploss_pips[0:Off]=0;
input int Sell_takeprofit[0:Off]=0;
//---Sell_counter_trend_scalling
input int Sell_counter_trend_scaling_after_grid[0:Off]=0;
input int Sell_counter_trend_Gap_scaling_percent[0:Off]=0;
input int Sell_counter_trend_lot_scaling_down[0:Off]=0;
//--Sell_trading_boundary
input float No_new_sell_on_or_above_price[0:Off]=0.0;
input float No_new_sell_on_or_below_price[0:Off]=0.0;
//--Operation_Settings
input int Reentry_after_grid_closure="Reentry allowed/Disallowed";
input int Max_open_ticket_count[0:Off]=0;
input float Max_spread_to_allow_trade_pips=5.0;
input float Grid_level_sensitivity_to_trade_pips=5.0;
input int Lot_adjustment_for_FIFO="Normal position sizing/Apply FIFO Adjustments";
//---Visual_grid_feedback_chart
input int Grid_level_shown_above_or_below_activity=3;
input int Buy_grid_onchart_colorscheme=7;
input int Sell_grid_onchart_colorscheme=5;
input color Grid_close_above_level_color=clrOrange;
input color Grid_close_below_level_color=clrOrange;
input color No_new_buy_above_level_color=clrDarkViolet;
input color No_new_buy_below_level_color=clrDarkViolet;
input color No_new_sell_above_level_color=clrDarkViolet;
input color No_new_sell_below_level_color=clrDarkViolet;
input color Grid_closeout_summary_text_color=clrGray;
//---Planning_mode_visual_feedback
input color Future_target_price_color=clrDarkRed;
input color Initial_entry_price_color=clrCornflowerBlue;
input color Realized_existing_trade_color=clrMediumAquamarine;
input color Open_existing_trade_color=clrDarkOrchid;
input color Realized_future_trade_color=clrYellowGreen;
input color open_future_trade_color=clrViolet;
input int Tick_scaling_for_CFD_markets[select]="Auto scale for Index markets/Never Scale/Always Scale";
input int Magic_number=20140328;