Jump to content

Functions in a professionally coded EA/trading robot


Guest EA-trader

Recommended Posts

Guest EA-trader

The following functions are useful in an EA, have them coded.Do you know of any other functions?

 

//--- Standard parameters
extern double Lots = 2.0;//£2 PER POINT
extern double TradeMaxRisk = 2; // TradeMaxRisk > 0 so much % risk will be used, either based on SL or Account equity
extern bool AutoLot = false;
extern bool AllowSecond = false;
extern int AdvancedProfitManagerBlackout = 60; // 60 minutes wait after the Advanced Profit Manager closes a trade
// First dailyEA1
extern string TRADING_DAYS1AM = "1,2,3,4,5";
extern int StopLossFirst1 = 600; // 0 deactivates Stop Loss
extern int StopLossSecond1 = 600;
extern int StartTrail1 = 300; // Start trail after so many pips.
extern int TrailingStop1 = 250; // 0 deactivates Trailing Stop
extern int TrailStep1 = 30; // With which increments TS moves
// Proportional stop
extern int PropStop1 = 1000; // PropStop follows behind current price by X pips
extern int StartPosition1 = 1650; // Pips profit at which to begin trailing with PropStop
extern double IncrementPercentage1 = 2; // Each pip of profit changes the PropStop value by X percent
extern int MinStopValue1 = 100; // PropStop cannot be less than X
extern int TakeProfit1 = 400; // 0 deactivates Take Profit
extern int GainForBE1 = 200; // How many pips will trigger Break Even. 0 deactivates.
extern int PipsBE1 = 20; // Level at which Break Even will be put
extern int StartTime1 = 130; // Start trading at 7:00
extern int StopTime1 = 1200; // Stop trading at 23:00; Set to StartTime for continous operation (default).
extern int PipGap1 = 100; // Pip gap between first and second entry
extern int TimeGap1 = 30; // Time gap between first and second entry of 30 min
extern int PipsLongEntry1 = -10;
extern int PipsShortEntry1 = 10;
extern string profit="==== Profit Manager ====";
extern int PMTP1 = 1650;
extern bool EnableExitManager = false;
extern double OldSwapLong = 1.0;
extern double OldSwapShort = -1.0;
extern int RangeDeviation = 100;

 


extern bool UseProbCountsFilter = true; //1 ea with high settings ,secon/forth /seventh/9 th with high settings on second and fourth strategy = msptifilter
extern bool UseProbCountsFilter2 = true;
extern bool UseMSSIFilter = false; // stoch4h
extern bool UsePriceFilter = false;
extern bool UseLWMAFilter = false;
extern bool UseMSEI601Filter = true; // total
extern bool UseConsolidationFilter = false; // oldpm
extern int MinimumPreviousRange = 2;
extern bool Disable_Comments = false; // EA will not display comments on screen
extern string closing="==== Close Times ====";
extern bool CloseOnTime = true;
extern int ClosingTime = 2000;
extern int FridayCloseHour = 19; // Close all pending and open orders on Friday 19.00 hours
extern datetime DisableFrom = D'2016.10.1 11:00:00'; // disable all new trades between 11.00am to 15.00 hours on 1/10/2008
extern datetime DisableTo = D'2016.10.1 15:00:00';
extern bool UseFILEilter = false;
//---- Debugging
extern bool DoScreenShots = true; // Makes screen shots when a trade is open

extern int ExpertID = 6667711;

extern bool UseAdvancedMM = true;//MARTIGALE

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • image.png

  • Posts

    • Hey everyone, it’s a new week with bullish momentum. $TON is trading around $5.3 today, and with all the hype and momentum, do you think it could outperform Solana in the long run?   If there's potential, I’d suggest we consider accumulating gradually ahead of the bull run. One way to do this could be by exploring TON giveaways, such as the one currently on Bitget platform.   It’s part of a TON carnival offering multiple learning opportunities and a Learn-to-Earn activity, where you answer TON-related questions and receive freebies.   Overall, these opportunities within the TON ecosystem seem worth considering given the potential. What’s your take on it?
    • Shiba Inu (SHIB) has opened trading on October 7, 2024, at $0.000018 with 3.74% gain in last 24 Hours as per Coinpedia markets data, marking a remarkable 20% increase over the weekend. Recent on-chain data suggests a mix of bullish indicators that could push SHIB above the $0.000020 level in the coming week. Weekend Rally Boosts Memecoin Market The global memecoin market saw a resurgence over the weekend, driven by increased investor confidence. Expectations of further interest rate cuts from the U.S. Federal Reserve have contributed to this renewed risk appetite. While newer tokens like Solana memes are gaining traction, classic favorites like Shiba Inu and Dogecoin continue to show impressive growth. Shiba Inu Derivatives Market Shows Bullish Trends Recent trends in Shiba Inu's derivatives market are signaling a bullish outlook, supported by open interest (OI) and funding rate dynamics. Open Interest on the Rise Increase in Open Interest: Between October 4 and October 7, Shiba Inu’s open interest in futures contracts climbed from $43.5 million to $51.5 million, an 18% increase. Spot Market Participation: The price increase of 20.15% outpaced the growth in open interest, indicating that the rally is largely supported by spot market investors rather than speculative traders. Why This Is a Positive Sign Support from Spot Markets: The fact that price gains outstripped open interest growth suggests that investors buying actual tokens are driving the price action. Spot market rallies typically indicate stronger demand and more conviction from long-term holders. Increased Commitment: The rise of $8 million in open interest means that more traders are entering the SHIB market. This influx of capital shows a growing belief in the sustainability of the upward trend. Looking Ahead Given these trends, Shiba Inu appears well-positioned to potentially break through the $0.000020 mark soon. The combination of strong spot market support and increasing open interest suggests a bullish sentiment among investors. For a deeper dive into Shiba Inu's potential and price predictions, be sure to check out our detailed Shiba Inu Price Prediction article!
×
×
  • Create New...
us