este é um trecho de um EA MQL5 para ativo pares do tipo EURUSD e nao funciona da mesma…
- User
este é um trecho de um EA MQL5 para ativo pares do tipo EURUSD e nao funciona da mesma forma usando indices como o US100 voce consegue configurar esse trecho para que seja possivel funcionar e ter lucros no US100?
#define PROJECT_ID "mt5-5961" //-- // Point Format Rules #define POINT_FORMAT_RULES "0.001=0.01,0.00001=0.0001,0.000001=0.0001" // this is deserialized in a special function later #define ENABLE_SPREAD_METER true #define ENABLE_STATUS true #define ENABLE_TEST_INDICATORS true //-- // Events On/Off #define ENABLE_EVENT_TICK 1 // enable "Tick" event #define ENABLE_EVENT_TRADE 1 // enable "Trade" event #define ENABLE_EVENT_TIMER 0 // enable "Timer" event //-- // Virtual Stops #define VIRTUAL_STOPS_ENABLED 0 // enable virtual stops #define VIRTUAL_STOPS_TIMEOUT 0 // virtual stops timeout #define USE_EMERGENCY_STOPS "no" // "yes" to use emergency (hard stops) when virtual stops are in use. "always" to use EMERGENCY_STOPS_ADD as emergency stops when there is no virtual stop. #define EMERGENCY_STOPS_REL 0 // use 0 to disable hard stops when virtual stops are enabled. Use a value >=0 to automatically set hard stops with virtual. Example: if 2 is used, then hard stops will be 2 times bigger than virtual ones. #define EMERGENCY_STOPS_ADD 0 // add pips to relative size of emergency stops (hard stops) //-- // Settings for events #define ON_TIMER_PERIOD 60 // Timer event period (in seconds)
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV// // System constants (predefined constants) // //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^// //-- #define TLOBJPROP_TIME1 801 #define OBJPROP_TL_PRICE_BY_SHIFT 802 #define OBJPROP_TL_SHIFT_BY_PRICE 803 #define OBJPROP_FIBOVALUE 804 #define OBJPROP_FIBOPRICEVALUE 805 #define OBJPROP_FIRSTLEVEL 806 #define OBJPROP_TIME1 807 #define OBJPROP_TIME2 808 #define OBJPROP_TIME3 809 #define OBJPROP_PRICE1 810 #define OBJPROP_PRICE2 811 #define OBJPROP_PRICE3 812 #define OBJPROP_BARSHIFT1 813 #define OBJPROP_BARSHIFT2 814 #define OBJPROP_BARSHIFT3 815 #define SEL_CURRENT 0 #define SEL_INITIAL 1
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV// // Enumerations, Imports, Constants, Variables // //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^//
//-- // Constants (Input Parameters) input string EA_Name = "News Snowball (Trailing Stop)"; input double Lots_fix = 0.01; input int SL_pips = 10; input int Grid_distance_pips = 4; input int Time_bomb_pips = 5; input int Time_bomb_seconds = 12; input int Trailing_stop_pips = 20; input int MagicStart = 5961; // Magic Number, kind of... class c { public: static string EA_Name; static double Lots_fix; static int SL_pips; static int Grid_distance_pips; static int Time_bomb_pips; static int Time_bomb_seconds; static int Trailing_stop_pips; static int MagicStart; }; string c::EA_Name; double c::Lots_fix; int c::SL_pips; int c::Grid_distance_pips; int c::Time_bomb_pips; int c::Time_bomb_seconds; int c::Trailing_stop_pips; int c::MagicStart;
//-- // Variables (Global Variables)
class v { public: static double Grid_distance_pips_BS; }; double v::Grid_distance_pips_BS;
- Assistant
- User
voce pode ajustar isso no trecho de codigo que te mostrei?
- Assistant
- User
nao deu certo
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.