Re: Coding Help
791Check out my Intraday Swinging Setup - Updated Q4 2022... viewtopic.php?p=1295496595#p1295496595
Change lines 54 and 56 fromvvFish 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. :|
Code: Select all
SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);
Code: Select all
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
Code: Select all
#property indicator_width1 = 5
#property indicator_width2 = 5
Thank youmrtools wrote: Tue Aug 28, 2018 2:42 pm
Change lines 54 and 56 from
toCode: Select all
SetIndexStyle(0,DRAW_LINE,0,2); SetIndexStyle(1,DRAW_LINE,0,2);
that will make those 2 lines be width = 1 after you change those 2 lines on the top you can addCode: Select all
SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE);
just put the width to 5 but you can put it any width.Code: Select all
#property indicator_width1 = 5 #property indicator_width2 = 5
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.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;
}
Thanks soo much Mrtools.mrtools wrote: Sun Sep 09, 2018 11:56 am
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.
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 );
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);
}
}
//+------------------------------------------------------------------+
Users browsing this forum: ChuChu Rocket and 14 guests