hi , anyone can please find what makes this indicator make chart laggy at TF change and suggest solution or fix it?
Attached File(s)
I will code your pivot EAs for no charge 28 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
Dislikedhi , anyone can please find what makes this indicator make chart laggy at TF change and suggest solution or fix it? {file}Ignored
DislikedHello. I have tested many money management expert advisors, but I was only able to find one or two simple ones that do not have the following issues: When I add the expert advisors, my candles become delayed, and the price line appears far away from the candles. As soon as I remove the expert, the candles start moving quickly again and return to their correct position and price. I would really appreciate your help in understanding what is causing this problem. Also, if there is an expert advisor for money and position management that does not create...Ignored
Disliked{quote} I didn't bother to figure out why it was causing a lag. Maybe because you have a lot of objects on your chart and the OnDeinit() was looping through all of them??? Anyways, I don't notice any lags now. But then, I didn't check it with a lot of open positions, so... {file}BTW, if you are getting compilation errors about buffers, and you are not using any buffers, the solution is NOT to add a dummy buffer! That is just plain stupid (tell it to the AI)!!!Ignored
ObjectsDeleteAll(0, "PIP_ROW_");
Disliked{quote} thanks , yeah exactly the problem was looping through objects. i didnt have so many objects though. the only issue with your version was it didnt remove the pip items from the chart when there is no trade. i added ObjectsDeleteAll(0, "PIP_ROW_"); to no position section , and so far seems ok , no lag. thank youIgnored
Disliked{quote} You really need to be careful! I compared two AIs, Claude and Gemini. Look at my previous post and then, here is the last update from Claude: https://claude.ai/share/3ab1340b-ad1...5-30f316ffb8c1 If you asked me, Claude did a better job at explaining the functionality of this indicator. Gemini made a huge mistke in interpreting the maths, and I needed to correct it when I saw the mistake. This means that even if Gemini created a code for you, it doesn't mean that the code is actually working properly.Ignored
Disliked{quote} My favourite for the moment, though not ideal, either. That's why, especially when one AI gets stuck, I outsource the task to another AI, sometimes more than one.Ignored
Disliked{quote} this is where AI fails buy recommendation on strong usd on gold {image}Ignored
Disliked{quote} LOL, and what did you expect? AI doesn't know anything! Did you expect AI to analyse multiple data points without you providing the data in the first place??? That's not a recommendation! That's just the result of whatever conditions and calculations you asked it to code!!! BTW, I'm not saying if that result (recommendation) is correct or not! That depends on your strategy! To me, it looks like you should have bought GOLD much lower, in the M15 context... {image}Ignored
QuoteDislikedwhich pairs in oanda ftmo evaluation account using .sim suffix can be used to find usd strength or weakness. can we code an indicator in mt5 to trade xauusd.sim using this logic with buy sell recommendation with target with probability % with corner adjustable text font size 14
//+------------------------------------------------------------------+
//| USD_Strength_Gold.mq5 |
//| Copyright 2024, Trading Helper |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024"
#property link ""
#property version "1.00"
#property indicator_chart_window
// Inputs
input int InpFontSize = 14; // Text Font Size
input ENUM_BASE_CORNER InpCorner = CORNER_LEFT_UPPER; // Display Corner
input int InpXOffset = 20; // X Distance
input int InpYOffset = 20; // Y Distance
// List of FTMO Oanda .sim pairs to monitor
string pairs[] = {"EURUSD.sim", "GBPUSD.sim", "AUDUSD.sim", "NZDUSD.sim", "USDJPY.sim", "USDCAD.sim", "USDCHF.sim"};
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit() {
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
ObjectsDeleteAll(0, "USD_DASH_");
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[]) {
int usd_strength_score = 0; // Out of 7
int total_pairs = 7;
for(int i=0; i<total_pairs; i++) {
double bid = SymbolInfoDouble(pairs[i], SYMBOL_BID);
double open_price = 0;
// Get Daily Open
double close_array[];
CopyClose(pairs[i], PERIOD_D1, 0, 1, close_array);
if(ArraySize(close_array) > 0) open_price = close_array[0];
if(bid > 0 && open_price > 0) {
// For XXXUSD: Price down = USD Strong
if(i < 4) { if(bid < open_price) usd_strength_score++; }
// For USDXXX: Price up = USD Strong
else { if(bid > open_price) usd_strength_score++; }
}
}
// Probability calculation
double prob = ((double)usd_strength_score / (double)total_pairs) * 100;
// Logic for XAUUSD.sim (Gold is inverse to USD)
string signal = "NEUTRAL";
color signalColor = clrWhite;
double tp = 0;
double gold_bid = SymbolInfoDouble("XAUUSD.sim", SYMBOL_BID);
double atr[];
CopyBuffer(iATR("XAUUSD.sim", _Period, 14), 0, 0, 1, atr);
if(usd_strength_score >= 5) { // USD Strong = Gold Sell
signal = "SELL GOLD";
signalColor = clrRed;
if(ArraySize(atr)>0) tp = gold_bid - (atr[0] * 2);
} else if(usd_strength_score <= 2) { // USD Weak = Gold Buy
signal = "BUY GOLD";
signalColor = clrLime;
if(ArraySize(atr)>0) tp = gold_bid + (atr[0] * 2);
}
UpdateDashboard(signal, prob, tp, signalColor);
return(rates_total);
}
//+------------------------------------------------------------------+
//| Update UI Dashboard |
//+------------------------------------------------------------------+
void UpdateDashboard(string signal, double prob, double tp, color sigCol) {
string text = "USD Analysis (.sim)\n" +
"Signal: " + signal + "\n" +
"Confidence: " + DoubleToString(prob, 1) + "%\n" +
"Target TP: " + DoubleToString(tp, _Digits);
CreateLabel("USD_DASH_LABEL", text, InpXOffset, InpYOffset, sigCol);
}
void CreateLabel(string name, string text, int x, int y, color col) {
if(ObjectFind(0, name) < 0) {
ObjectCreate(0, name, OBJ_LABEL, 0, 0, 0);
ObjectSetInteger(0, name, OBJPROP_CORNER, InpCorner);
ObjectSetInteger(0, name, OBJPROP_FONTSIZE, InpFontSize);
ObjectSetString(0, name, OBJPROP_FONT, "Arial");
}
ObjectSetString(0, name, OBJPROP_TEXT, text);
ObjectSetInteger(0, name, OBJPROP_COLOR, col);
ObjectSetInteger(0, name, OBJPROP_XDISTANCE, x);
ObjectSetInteger(0, name, OBJPROP_YDISTANCE, y);
} Disliked{quote} {quote} //+------------------------------------------------------------------+ //| USD_Strength_Gold.mq5 | //| Copyright 2024, Trading Helper | //+------------------------------------------------------------------+ #property copyright "Copyright 2024" #property link "" #property version "1.00" #property indicator_chart_window // Inputs input int InpFontSize = 14; // Text Font Size input ENUM_BASE_CORNER InpCorner = CORNER_LEFT_UPPER; // Display Corner input int InpXOffset = 20; // X Distance input int InpYOffset = 20; // Y Distance // List...Ignored
Disliked{quote} This has nothing to do with your trading strategy. If your indicator says BUY, you need to ask yourself a number of questions before making the trade decision. Questions like: 1. What is my higher TF context trend saying? If it's saying "the trend or pressure is up", I can look for Buy. If "the trend/pressure" is down, I don't look for Buy, 2. Is the price for Buy good? Low = good, high = not good, 3. and so on, until all your doubts are cleared... Last question should always be: Is all the above consistent with my strategy? Yes = trade....Ignored
Disliked{quote} i spent a lot of time adjusting, finally got it working to rhyme with usd {image}Ignored
Disliked{quote} i spent a lot of time adjusting, finally got it working to rhyme with usd {image}Ignored
Disliked{quote} Sure, but that's a very weird price to BUY!!! The market is at some major SR level, and it can go either way... {image} If you want to make profits, you need to Buy cheap and Sell expensive. If you Buy expensive counting that it will be even more expensive, the Market Maker will most likely take your money without even saying "thank you"! Because you provided liquidity! BTW, my arrow isn't decisive, it's just some relative information. It can change any time. Anyways, I much rather Buy at the blue prices than at the red prices!!!Ignored