TRO INDICATORS FOR MT4

free & uncensored discussion arena for TheRumpledOne

Moderator: moderators

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 12:04 am

Not on top... on the right hand side of the chart.
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!

Please do NOT PM me with trading or coding questions, post them in a thread.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Skyline
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Tue Jan 16, 2007 1:27 pm
Reputation: 0
Gender: Male
Contact:

Postby Skyline » Fri Nov 23, 2007 12:07 am

I see know your chart and since you are using a black chart , it could be useful to change color threshold in the input windows parameters.

Skyline
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Tue Jan 16, 2007 1:27 pm
Reputation: 0
Gender: Male
Contact:

Postby Skyline » Fri Nov 23, 2007 12:10 am

TheRumpledOne wrote:Not on top... on the right hand side of the chart.


mm oh ok , so you want to see only the last bar value on the right side of chart ?

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 12:12 am



That's the eSignal version of TRO RANGE.

Current bar's range is displayed on the right axis.

Simple!!
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 12:17 am

Skyline:

All this indicator does is display the range ( high - low ) of the bar.

You still have to enter/exit the trade. This is no magic indicator.

But knowing that a candle has exceeded it's range may get you a reversal entry for a few pips especially near support/resistance.

Just need that MT4 TRO Dynamic Support/Resistance indicator...LOL!
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Skyline
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Tue Jan 16, 2007 1:27 pm
Reputation: 0
Gender: Male
Contact:

Postby Skyline » Fri Nov 23, 2007 12:20 am

yes I see TRO , I'll play a little bit with indicator and let you know if I'll be able to add that value

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 12:39 am



It looks like the range current value is in the upper left hand side of the chart.

Notice how the USDJPY bounced off the bottom of the short zone and then went up 13 pips. Price must range!!
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

Skyline
rank: <50 posts
rank: <50 posts
Posts: 39
Joined: Tue Jan 16, 2007 1:27 pm
Reputation: 0
Gender: Male
Contact:

Postby Skyline » Fri Nov 23, 2007 12:55 am

Here's fixed version with both values displayed for threshold and current bar ;)

Code: Select all

//+-------------------------------------------------------------------+
//|                                         TRO RANGE Accumulator.mq4 |
//|                                                         TRO, 2007 |
//|                                modified by Skyline on 22 Nov 2007 |
//+-------------------------------------------------------------------+
#property  copyright "Copyright ? 2007, Avery T. Horton, Jr. aka TRO"
#property  link      "http://www.therumpldone.com/"


//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 2
#property  indicator_color1  Red
#property  indicator_color2  Green

//---- indicator buffers
double     RANGEBuffer[];
double     RANGEBuffer1[];

//---- indicator parameters 
extern int   Threshold=20;
extern color CurrentBarColor = Yellow;
extern color ThresholdColor  = Aqua;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {

//---- drawing settings
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);
//---- indicator buffers mapping
   SetIndexBuffer(0,RANGEBuffer);
   SetIndexBuffer(1,RANGEBuffer1); 
//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("RANGE");
   SetIndexLabel(0,"RANGE");
   SetIndexLabel(1,"RANGE");

//---- initialization done
   return(0);
  }
int deinit()
{
   ObjectDelete("CurrentBarValue");
   ObjectDelete("LabelCurrentBarValue"); 

//+------------------------------------------------------------------+
//| Range                                                            |
//+------------------------------------------------------------------+
int start()
  {
   double HighVal,LowVal;
   int limit;
   int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
  if(counted_bars>0) counted_bars--;
  limit=Bars-counted_bars;
//---- RANGE counted in the 1-st buffer
   for(int i=0; i<limit; i++)
   {
     HighVal  = iHigh(NULL,0,i);       
     LowVal   = iLow(NULL,0,i);
     if ((HighVal-LowVal)/Point >= Threshold) { RANGEBuffer1[i] = (HighVal-LowVal)/Point; }
     else { RANGEBuffer[i] = (HighVal-LowVal)/Point; }

     // Draw Threshold line
     int win_idx=WindowFind("RANGE");
     ObjectDelete("Threshold");
     ObjectCreate("Threshold", OBJ_HLINE, win_idx, Time[0], Threshold);
     ObjectSet("Threshold", OBJPROP_COLOR, ThresholdColor);
     ObjectSet("Threshold", OBJPROP_STYLE, STYLE_SOLID);
     ObjectSet("Threshold", OBJPROP_WIDTH, 2);
     ObjectSet("Threshold", OBJPROP_BACK, true);
     
     // Label for Threshold
     ObjectDelete("LabelThreshold");
     ObjectCreate("LabelThreshold", OBJ_TEXT, win_idx, Time[0], Threshold);
     ObjectSet("LabelThreshold", OBJPROP_COLOR, ThresholdColor);
     ObjectSetText("LabelThreshold", "Threshold",8);
     ObjectSet("LabelThreshold", OBJPROP_ANGLE, 0);
     
     // Draw Current Bar line value
     ObjectDelete("CurrentBarValue");
     ObjectCreate("CurrentBarValue", OBJ_HLINE, win_idx, Time[0], (iHigh(NULL,0,0)-iLow(NULL,0,0))/Point);
     ObjectSet("CurrentBarValue", OBJPROP_COLOR, CurrentBarColor);
     ObjectSet("CurrentBarValue", OBJPROP_STYLE, STYLE_SOLID);
     ObjectSet("CurrentBarValue", OBJPROP_WIDTH, 2);
     ObjectSet("CurrentBarValue", OBJPROP_BACK, true);
     
     // Label per Current Bar Line
     ObjectDelete("LabelCurrentBarValue");
     ObjectCreate("LabelCurrentBarValue", OBJ_TEXT, win_idx, Time[0], (iHigh(NULL,0,0)-iLow(NULL,0,0))/Point);
     ObjectSet("LabelCurrentBarValue", OBJPROP_COLOR, CurrentBarColor);
     ObjectSetText("LabelCurrentBarValue", "Current Bar value",8);
     ObjectSet("LabelCurrentBarValue", OBJPROP_ANGLE, 0);     
   }   
   
//---- done
   return(0);
  }


Now I'm going to sleep since it's 2 am here :)

Happy pips ;)

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 1:25 am



Getting warmer!!

Thanks.
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 11440
Joined: Sun May 14, 2006 9:31 pm
Reputation: 45
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Fri Nov 23, 2007 1:41 am



Took out the text.

Code: Select all

//+-------------------------------------------------------------------+
//|                                         TRO RANGE Accumulator.mq4 |
//|                                                         TRO, 2007 |
//|                                modified by Skyline on 22 Nov 2007 |
//+-------------------------------------------------------------------+
#property  copyright "Copyright ? 2007, Avery T. Horton, Jr. aka TRO"
#property  link      "http://www.therumpldone.com/"


//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 2
#property  indicator_color1  Red
#property  indicator_color2  Green

//---- indicator buffers
double     RANGEBuffer[];
double     RANGEBuffer1[];

//---- indicator parameters 
extern int   Threshold=20;
extern color CurrentBarColor = Yellow;
extern color ThresholdColor  = Aqua;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {

//---- drawing settings
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);
//---- indicator buffers mapping
   SetIndexBuffer(0,RANGEBuffer);
   SetIndexBuffer(1,RANGEBuffer1); 
//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("RANGE");
   SetIndexLabel(0,"RANGE");
   SetIndexLabel(1,"RANGE");

//---- initialization done
   return(0);
  }
int deinit()
{
   ObjectDelete("CurrentBarValue");
   ObjectDelete("LabelCurrentBarValue"); 

//+------------------------------------------------------------------+
//| Range                                                            |
//+------------------------------------------------------------------+
int start()
  {
   double HighVal,LowVal;
   int limit;
   int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
  if(counted_bars>0) counted_bars--;
  limit=Bars-counted_bars;
//---- RANGE counted in the 1-st buffer
   for(int i=0; i<limit; i++)
   {
     HighVal  = iHigh(NULL,0,i);       
     LowVal   = iLow(NULL,0,i);
     if ((HighVal-LowVal)/Point >= Threshold) { RANGEBuffer1[i] = (HighVal-LowVal)/Point; }
     else { RANGEBuffer[i] = (HighVal-LowVal)/Point; }

     // Draw Threshold line
     int win_idx=WindowFind("RANGE");
     ObjectDelete("Threshold");
     ObjectCreate("Threshold", OBJ_HLINE, win_idx, Time[0], Threshold);
     ObjectSet("Threshold", OBJPROP_COLOR, ThresholdColor);
     ObjectSet("Threshold", OBJPROP_STYLE, STYLE_SOLID);
     ObjectSet("Threshold", OBJPROP_WIDTH, 1);
     ObjectSet("Threshold", OBJPROP_BACK, true);
     
     // Label for Threshold
//     ObjectDelete("LabelThreshold");
//     ObjectCreate("LabelThreshold", OBJ_TEXT, win_idx, Time[0], Threshold);
     ObjectSet("LabelThreshold", OBJPROP_COLOR, ThresholdColor);
     ObjectSetText("LabelThreshold", "Threshold",8);
    ObjectSet("LabelThreshold", OBJPROP_ANGLE, 0);
     
     // Draw Current Bar line value
     ObjectDelete("CurrentBarValue");
     ObjectCreate("CurrentBarValue", OBJ_HLINE, win_idx, Time[0], (iHigh(NULL,0,0)-iLow(NULL,0,0))/Point);
     ObjectSet("CurrentBarValue", OBJPROP_COLOR, CurrentBarColor);
     ObjectSet("CurrentBarValue", OBJPROP_STYLE, STYLE_SOLID);
     ObjectSet("CurrentBarValue", OBJPROP_WIDTH, 1);
     ObjectSet("CurrentBarValue", OBJPROP_BACK, true);
     
     // Label per Current Bar Line
//     ObjectDelete("LabelCurrentBarValue");
//     ObjectCreate("LabelCurrentBarValue", OBJ_TEXT, win_idx, Time[0], (iHigh(NULL,0,0)-iLow(NULL,0,0))/Point);
     ObjectSet("LabelCurrentBarValue", OBJPROP_COLOR, CurrentBarColor);
     ObjectSetText("LabelCurrentBarValue", "Current Bar value",8);
     ObjectSet("LabelCurrentBarValue", OBJPROP_ANGLE, 0);     
   }   
   
//---- done
   return(0);
  }
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “TheRumpledOne”