I want a sign to appear when ADX drops below the level I set. I drew a picture as an example. arrows appear when the level drops below.
Attached File(s)
I will code your pivot EAs for no charge 24 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
Disliked{quote} Maybe the arrows and alerts aren't working on M5 because you have the PipBuffer too large? {image}Ignored
Disliked{quote} In order to hide the comment, you need to do: Comment(""); So, you can do: if(showtext) { Comment("whatever the comment is"); CreateLabel(); } else { Comment(""); if(ObjectFind("LabelName",ChartID())==ChartID()) ObjectDelete(ChartID(),"LabelName"); }Ignored
Disliked{quote} Thank you for checking Sir as i understand pip buffer is how much distance i want before alert, 2 is too small i want 4 or 5 is it possible? i wish i to know whats happening with usdx in relation to price to MA, is it possible to make the attached indicator currency pair/timeframe selection option so that trader can see whats happening with e.g usdx /timeframe on gbpusd chart or to add alert pairs/timeframe/pips distance, {file}Ignored
Disliked{quote} Thanks i could pretty much do it,there were so many texts with apostrophies, can you pleae guide me as how can i remove these remaining ones and price label on high and low levels of ATR lines thanks. {image}Ignored
string OBJ_Prefix = "My_Prefix"; ObjectsDelete(OBJ_Prefix); //+------------------------------------------------------------------+ void ObjectsDelete(string name) { for(int j=0;j<10;j++) for(int i=0;i<ObjectsTotal();i++) { if(StringFind(ObjectName(i),name,0)>-1) ObjectDelete(0,ObjectName(i)); } } //+------------------------------------------------------------------+
DislikedI want to enter a period for the indicator I sent, as shown in the picture. BestTraderEv {image} {file}Ignored
Dislikedhey everyone , here is really interesting indy called "independent chart" which let you have independent objects for each symbol in the same chart , without conflicting. But it keeps the drawing only in the tf which it has drawn in , it would be really cool if it be shown in lower tfs too. But of course not in higher time frames... Please take a look to see if possible. Thanks {file}Ignored
Disliked{quote} Unfortunatelly, if there is no common text string for all the objects, you must delete them by their name, specifically. If there is a commont text string, then you can use a function like this: string OBJ_Prefix = "My_Prefix"; ObjectsDelete(OBJ_Prefix); //+------------------------------------------------------------------+ void ObjectsDelete(string name) { for(int j=0;j<10;j++) for(int i=0;i<ObjectsTotal();i++) { if(StringFind(ObjectName(i),name,0)>-1) ObjectDelete(0,ObjectName(i)); } } //+------------------------------------------------------------------+...Ignored
string OBJ_Prefix = "My_Prefix"; // This is usually a global variable someFunction() // start(), or OnDeinit(), or wherever desired in your code { //... objectsDelete(OBJ_Prefix); } //+------------------------------------------------------------------+ void objectsDelete(string name) { int objTotal = ObjectsTotal(); // It's more efficient to just run ObjectsTotal() one time only, rather than to repeat for every "i" in the for-loop-condition statement for(int i=objTotal-1; i>=0; i--) // When deleting objects, one MUST decrement the loop, never increment { string objName = ObjectName(i); // It's more efficient to run ObjectName just once and store the name vs. twice for the objects you end up deleting if(StringFind(objName,name,0) == 0) ObjectDelete(0,objName); // Check ONLY for the name as a PREFIX, not as merely a sub-string } } //+------------------------------------------------------------------+
DislikedHi Coders, Could you please alert only once when the Blue and yellow dot apper in the attached indicator. Currently every candle pop up alert. Also chenge the indicator name to trend-wave R1. Thanks in advance. {file} {file} {image} {image}Ignored
Disliked{quote} BestTraderEv, Just fyi, your code snippet has a few problems: * You have a "for j" loop that is completely unnecessary, since "j" is not even a variable used later in the code. You're just repeating the "for i" loop 10 times. * Your "for i" loop -- in my experience proven to be necessary in the past, and I think it still is -- MUST be a decrementing loop, never incrementing! When you delete an object, it changes the index value for all the other higher-indexed objects, essentially re-numbering the objects that remain to be checked. The net...Ignored
//+------------------------------------------------------------------+ // Delete all objects with given prefix void ObDeleteObjectsByPrefix(string Prefix) { int L = StringLen(Prefix); int i = 0; while(i < ObjectsTotal()) { string ObjName = ObjectName(i); if(StringSubstr(ObjName, 0, L) != Prefix) { i++; continue; } ObjectDelete(ObjName); } } //---------------------------------------------------------+
Disliked{quote} Yes, that's the idea. You see, I have experienced situations where not all objects were removed from the chart. And this trick solves the problem. Otherwise, sure, np.Ignored
//+------------------------------------------------------------------+ //| Script_Demonstrates_proper_objectsDelete_function.mq4 | //| Copyright 2023 | //| https://forexfactory.com/pips4life | //+------------------------------------------------------------------+ #property copyright "Copyright 2023" #property link "https://forexfactory.com/pips4life" #property version "1.00" #property strict #property description "Use_Decrement=true illustrates the correct method; false (default; increments loop) does NOT delete all the objects!" #property show_inputs // This key property for scripts brings up a popup window of the external variables. input bool Use_Decrement = false; // Use_Decrement: true works, false does not! //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- string OBJ_Prefix = "My_Prefix"; for(int k=0; k<10; k++) { string objName = OBJ_Prefix+"_test_"+IntegerToString(k); ObjectDelete(objName); // Delete first, so the script can be run again. ObjectCreate(0,objName,OBJ_LABEL,0,0,0); ObjectSetInteger(0,objName,OBJPROP_YDISTANCE,20); ObjectSetInteger(0,objName,OBJPROP_XDISTANCE,20+10*k); ObjectSetInteger(0,objName,OBJPROP_FONTSIZE,12); ObjectSetString(0,objName,OBJPROP_TEXT,IntegerToString(k)); } objectsDelete(OBJ_Prefix, Use_Decrement); if(!Use_Decrement) { Alert("NOTE: 10 labels were created. Notice that 5 of them are NOT deleted if using an incremental counter in the objectsDelete function"); Alert("... Run this script again using 'Use_Decrement=true' to illustrate the proper way to delete all 10 objects."); } else Alert("NOTE: 10 labels were created. All 10 were deleted properly because a decremental counter is used in the objectsDelete function"); } //+------------------------------------------------------------------+ void objectsDelete(string prefix, bool USE_DECREMENT) { int objTotal = ObjectsTotal(); // It's more efficient to run ObjectsTotal() one time only, rather than to repeat for every "i" if(USE_DECREMENT) { // Only this choice works to delete all the objects for(int i=objTotal-1; i>=0; i--) // When deleting objects, one MUST decrement the loop, never increment { string objName = ObjectName(i); // It's more efficient to run ObjectName just once and store the name vs. twice for the objects you end up deleting if(StringFind(objName,prefix,0) == 0) ObjectDelete(0,objName); // Check ONLY for the name as a PREFIX, not as merely a sub-string } } else { // This choice to increment i does NOT work to delete all the objects! for(int i=0; i<objTotal; i++) // This *increment* loop skips some objects and doesn't work properly! { string objName = ObjectName(i); if(StringFind(objName,prefix,0) == 0) ObjectDelete(0,objName); } } } //+------------------------------------------------------------------+
Dislikedhello friend. newbie here. i want to ask for help to code my modified candlestick pattern in mt5. ps: i have the pine script at tradingview can anyone help me? thanksIgnored
Disliked{quote} First, I can't read anything in this indicator. Whatever language the discriptions were written in, they show like this: {image} And I don't have a single idea what this is about. Same with texts for alerts. So, if you want me to study this indicator, I need something I can work with.Ignored
DislikedMerhaba, Göstergenin ayarlandığı seviyede ulaştığında görünmesini istiyorum. bana bu konuda birileri yardımcı olabilir mi? Örnek olarak resim gönderdim. Okların seviyesinin işaretlendiği alanda olmasını istiyorum {image} {file}Ignored
Disliked{quote}...(i < ObjectsTotal()... i++...as for counting down, or up, I don't know, I tend to use what works. I have only experienced this skipping issue once...Ignored