Re: Something interesting please post here (Metatrader)

3335
dmnik wrote: Mon Nov 27, 2023 9:28 pm Those who want to test the indicator! We need to get 500 likes per video, half are already there!!!
Binary Trading Non Repaint MT4 Indicator


Image
These users thanked the author dmnik for the post (total 2):
sal, rpm777
Who knows others is wise
Who knows himself is enlightened


DownloadRe: Something interesting please post here (Metatrader)

3339
I have an idea for technical indicator , I used chatgpt to generate some code with help of Malden's deviation channel since i am not a coder. The idea is very simple, and it can be used as support and resistance or entry signal/confirmation. also i think it is important since i have not seen anything like this in my experience with indicator testing:
Lines that connect the close of candles for a specific period with the close of the last closed candle. After this when the new candle forms , these lines can act as a sr/trendlines (but in a different way as you can see), and i think that they are more accurate than trendlines . Also another idea would be if the lines would be extended forward or lets say you add two periods and with that you see the intersection of the candle close lines for those two periods. For now some help would be nice to make the code function properly (when a new candle forms it doesn't move forward) and to add more features if possible (like extended lines, or double periods, or other ideas welcome..)
Here is the code:

//| CustomWhiteLines.mq4 |
//| Copyright 2023, Your Name |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, Your Name"
#property version "1.00"
#property strict
#property indicator_chart_window

//--- indicator buffers
double closeBuffer[];

//--- parameters
input int customPeriod = 10;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
IndicatorBuffers(1);
SetIndexBuffer(0, closeBuffer);
ArraySetAsSeries(closeBuffer, true);

SetIndexLabel(0, "Close Buffer");

return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| 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[])
{
static datetime lastTime = 0;

// Check if a new candle has opened
if (time[0] != lastTime)
{
// Delete all existing lines
for (int i = ObjectsTotal(0, OBJ_TREND, 0); i >= 0; i--)
{
string objectName = ObjectName(0, i);
if (StringFind(objectName, "Line_") == 0)
ObjectDelete(0, objectName);
}

lastTime = time[0]; // Move this line after deleting lines
}

int limit = MathMin(rates_total - prev_calculated, customPeriod);

// Copy close prices to buffer
ArraySetAsSeries(closeBuffer, true);
ArrayCopy(closeBuffer, close, 0, prev_calculated, limit);

int lastClosedIndex = 0;

// Find the index of the last closed candle before the open candle
for (int i = limit - 1; i >= 0; i--)
{
if (open == close)
{
lastClosedIndex = i;
break;
}
}

// Draw white lines connecting the close of the first candle to each subsequent candle close
for (int i = 1; i <= lastClosedIndex; i++)
{
// Draw a white line from the close of the first candle to the close of each subsequent candle
ObjectCreate(0, "Line_" + IntegerToString(i), OBJ_TREND, 0, Time[0], closeBuffer[0], Time, closeBuffer);
ObjectSetInteger(0, "Line_" + IntegerToString(i), OBJPROP_COLOR, clrWhite);
ObjectSetInteger(0, "Line_" + IntegerToString(i), OBJPROP_RAY_LEFT, false);
ObjectSetInteger(0, "Line_" + IntegerToString(i), OBJPROP_RAY_RIGHT, false);
}

return(rates_total);
}
//+------------------------------------------------------------------+

Image
Attachments

Re: Something interesting please post here (Metatrader)

3340
dmnik wrote: Tue Dec 05, 2023 6:36 pm SS_SupportResistance_v04c-original-mod.ex4
Jhones Pro Hindi - Indicador.ex4
CandleTimer_Am.ex4
2.tpl
good indicator settings bro.

i find some how near to his indicator which from my library..
my indicator i put arrow reversal trend method ... see this
Attachments
These users thanked the author sal for the post:
dmnik
"There is NO GOD higher than TRUTH" - Mahatma Gandhi


Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], dininurin, lyo99, Proximic [Bot] and 59 guests