Re: Coding Help

#791
hannele wrote:
Fri Aug 24, 2018 6:58 pm
simon_n3z wrote:
Fri Aug 24, 2018 6:47 pm


You are right, I meant for the starting lots add a tweak.

Anyhow I managed to do it on my own, so find attached WPR Grid EA with MMFiX...

Thanks for your concern Mr.Tools, and all the help you always give...

Keep rocking friends...

-Simon
Hi Simon,

You forgot to attach :)
cheers hannele


Re: Coding Help

#792
Dear coders, help to change the thickness of the line to the maximum, so that it does not return to its original state.
I'm only interested in two lines.
Thanks in advance. :|
Screenshot_4.png
Screenshot_5.png
RSI TMA ML.mq4
(7.57 KiB) Downloaded 274 times
"Only the price on the chart can show the entrance to the deal..."

Re: Coding Help

#793
vvFish wrote:
Tue Aug 28, 2018 2:27 pm
Dear coders, help to change the thickness of the line to the maximum, so that it does not return to its original state.
I'm only interested in two lines.
Thanks in advance. :|
Change lines 54 and 56 from

Code: Select all

SetIndexStyle(0,DRAW_LINE,0,2); 
SetIndexStyle(1,DRAW_LINE,0,2);  
to

Code: Select all

SetIndexStyle(0,DRAW_LINE); 
SetIndexStyle(1,DRAW_LINE);  
that will make those 2 lines be width = 1 after you change those 2 lines on the top you can add

Code: Select all

#property indicator_width1 = 5
#property indicator_width2 = 5
just put the width to 5 but you can put it any width.

Re: Coding Help

#794
mrtools wrote:
Tue Aug 28, 2018 2:42 pm
vvFish wrote:
Tue Aug 28, 2018 2:27 pm
Dear coders, help to change the thickness of the line to the maximum, so that it does not return to its original state.
I'm only interested in two lines.
Thanks in advance. :|
Change lines 54 and 56 from

Code: Select all

SetIndexStyle(0,DRAW_LINE,0,2); 
SetIndexStyle(1,DRAW_LINE,0,2);  
to

Code: Select all

SetIndexStyle(0,DRAW_LINE); 
SetIndexStyle(1,DRAW_LINE);  
that will make those 2 lines be width = 1 after you change those 2 lines on the top you can add

Code: Select all

#property indicator_width1 = 5
#property indicator_width2 = 5
just put the width to 5 but you can put it any width.
Thank you
"Only the price on the chart can show the entrance to the deal..."

Re: Coding Help

#795
Hello Mladen amd Mrtools, i need your help coding an indicator show up arrows when Super trend is up and down arrows when is down, my code is the fallow but only show up arrows, thanks in advance.

double ST(int i)
{
double up = iCustom(Symbol(),0,"SuperTrend nrp (new format)",0,i);
double dn = iCustom(Symbol(),0,"SuperTrend nrp (new format)",1,i);

if(up)
{
return(1);
}
if(dn)
{
return(-1);
}

return(0);
}

bool Arrowup(int i)
{
bool up=false;

up = ST(i)==1;

if(up)
{
return true;
}
return false;

}
bool Arrowdn(int i)
{
bool dn=false;

dn = ST(i)==-1;

if(dn)
{
return true;
}
return false;
}
SuperTrend nrp (new format).mq4
(3.88 KiB) Downloaded 325 times
1458.png


Re: Coding Help

#796
Cladi39 wrote:
Sun Sep 09, 2018 3:51 am
Hello Mladen amd Mrtools, i need your help coding an indicator show up arrows when Super trend is up and down arrows when is down, my code is the fallow but only show up arrows, thanks in advance.

double ST(int i)
{
double up = iCustom(Symbol(),0,"SuperTrend nrp (new format)",0,i);
double dn = iCustom(Symbol(),0,"SuperTrend nrp (new format)",1,i);

if(up)
{
return(1);
}
if(dn)
{
return(-1);
}

return(0);
}

bool Arrowup(int i)
{
bool up=false;

up = ST(i)==1;

if(up)
{
return true;
}
return false;

}
bool Arrowdn(int i)
{
bool dn=false;

dn = ST(i)==-1;

if(dn)
{
return true;
}
return false;
}
Think it would be better to use the indicator you posted and use the buffer called "Direction" to make the arrows.If you want to make it separate indicator can do the iCustom call to the Direction buffer#3.

Re: Coding Help

#797
mrtools wrote:
Sun Sep 09, 2018 11:56 am
Cladi39 wrote:
Sun Sep 09, 2018 3:51 am
Hello Mladen amd Mrtools, i need your help coding an indicator show up arrows when Super trend is up and down arrows when is down, my code is the fallow but only show up arrows, thanks in advance.

double ST(int i)
{
double up = iCustom(Symbol(),0,"SuperTrend nrp (new format)",0,i);
double dn = iCustom(Symbol(),0,"SuperTrend nrp (new format)",1,i);

if(up)
{
return(1);
}
if(dn)
{
return(-1);
}

return(0);
}

bool Arrowup(int i)
{
bool up=false;

up = ST(i)==1;

if(up)
{
return true;
}
return false;

}
bool Arrowdn(int i)
{
bool dn=false;

dn = ST(i)==-1;

if(dn)
{
return true;
}
return false;
}
Think it would be better to use the indicator you posted and use the buffer called "Direction" to make the arrows.If you want to make it separate indicator can do the iCustom call to the Direction buffer#3.
Thanks soo much Mrtools.

Re: Coding Help

#799
Can someone help me make this work with the usdjpy-4 format
it works with the standard usdjpy format
oanda for some reason adds the -4 tag on all pairs and I think that is why it is not working, Thanks!

Code: Select all

//+------------------------------------------------------------------+
//|                                                    ChgTF-All.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, zznbrm"
#property show_inputs

#import "user32.dll"
   int      PostMessageA(int hWnd,int Msg,int wParam,int lParam);
   int      GetWindow(int hWnd,int uCmd);
   int      GetParent(int hWnd);
#import

extern int eintTF = PERIOD_M5;
                   
int start()
{      
   bool blnContinue = true;   
   int intParent = GetParent( WindowHandle( Symbol(), Period() ) );   
   int intChild = GetWindow( intParent, 0 );  
   int intCmd; 
   
   switch( eintTF )
   {
      case PERIOD_M1:   intCmd = 33137;  break;
      case PERIOD_M5:   intCmd = 33138;  break;
      case PERIOD_M15:  intCmd = 33139;  break;
      case PERIOD_M30:  intCmd = 33140;  break;
      case PERIOD_H1:   intCmd = 35400;  break;
      case PERIOD_H4:   intCmd = 33136;  break;
      case PERIOD_D1:   intCmd = 33134;  break;
      case PERIOD_W1:   intCmd = 33141;  break;
      case PERIOD_MN1:  intCmd = 33334;  break;
   }
   
   if ( intChild > 0 )   
   {
      if ( intChild != intParent )   PostMessageA( intChild, 0x0111, intCmd, 0 );
   }
   else      blnContinue = false;   
   
   while( blnContinue )
   {
      intChild = GetWindow( intChild, 2 );   
   
      if ( intChild > 0 )   
      { 
         if ( intChild != intParent )   PostMessageA( intChild, 0x0111, intCmd, 0 );
      }
      else   blnContinue = false;   
   }
   
   // Now do the current window
   PostMessageA( intParent, 0x0111, intCmd, 0 );
}

Re: Coding Help

#800
I found a guy on youtube and wrote this its not great but it works
there is a weird popup at the end

Code: Select all

//+------------------------------------------------------------------+
//|                                                changerthingy.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                              |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      ""
#property version   "1.00"
#property strict
#property show_inputs

extern ENUM_TIMEFRAMES tf=240;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
long firstchart = ChartFirst();
while(firstchart>0)
{
ChartSetSymbolPeriod(firstchart,ChartSymbol(firstchart),tf);
firstchart=ChartNext(firstchart);
}

   
  }
//+------------------------------------------------------------------+


  1. Similar Topics

    1. Coding help please

      1 Replies 529 Views

      by Deez, Thu Nov 05, 2020 6:54 pm in Coding Help

      1 Replies
      529 Views
    2. CODING HELP

      0 Replies 1099 Views

      by slyfer91, Sun Apr 25, 2021 6:43 am in Coding Help

      0 Replies
      1099 Views
    3. Paid Coding

      1 Replies 670 Views

      by mecca, Sun Sep 27, 2020 9:31 am in Express Coding & Commercial Services

      1 Replies
      670 Views

Return to “Coding Help”