Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Button control panel for Amibroker (AFL)

Rating:
3 / 5 (Votes 6)
Tags:
amibroker, panel

Simple Control panel for manual trading. Adapted for MICEX.

Screenshots

Similar Indicators / Formulas

Signal Panel
Submitted by niladri over 8 years ago
bad tick clean
Submitted by pious243 over 7 years ago
3_6Day GuaiLiLv
Submitted by motorfly over 8 years ago
Williams Alligator System
Submitted by durgesh1712 over 8 years ago
*Level Breakout system*
Submitted by Tinych over 8 years ago
Horizontal Live Priceline Tool
Submitted by northstar over 8 years ago

Indicator / Formula

Copy & Paste Friendly
Title = "";
formulaName = "Control Panel";
GfxSetBkMode(1);
GfxSelectFont("Verdana", 18, 700, italic=False);
GfxSetTextColor(colorBrightGreen);
GfxTextOut(FormulaName, 20, 10);

_SECTION_BEGIN("Control Panel");
// Base point - Left Up Corner
X0 = Param ("X - Left Up Corner",   20,   4,  200, 10);
Y0 = Param ("Y - Right Up Corner",   120,  40, 200, 10);

// --- Button pressed
LBClick = GetCursorMouseButtons() == 9;	// Click
MouseX  = Nz(GetCursorXPosition(1));		// 
MouseY  = Nz(GetCursorYPosition(1));		// 

// --- Button Draw
procedure DrawBut (Text, x1, y1, x2, y2, colorFrom, colorTo)
{
	GfxSetOverlayMode(0);
	GfxSelectFont("Verdana", 9, 700);
	GfxSetBkMode(1);
	GfxGradientRect(x1, y1, x2, y2, colorFrom, colorTo);
	GfxDrawText(Text, x1, y1, x2, y2, 32|1|4|16);
}
GfxSetTextColor(colorWhite);

// Button Begin
DrawBut ("Begin", X0, Y0, X0+170, Y0+30, colorGrey40, colorGrey40);
CursorInResetBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0 AND MouseY <= Y0+30;
ResetPressed = CursorInResetBut AND LBClick;
if (ResetPressed) 
{ 
StaticVarSet ("RS", 1);      
StaticVarSet ("AutoOn",  0); 
StaticVarSet ("AutoOff", 1); 
StaticVarSet ("SMKT",    0); 
StaticVarSet ("BMKT",    0);
StaticVarSet ("CLPOS",   0);
StaticVarSet ("CANC",    0);
StaticVarSet ("ExpOn",   0); 
StaticVarSet ("ExpOff",  1);
}

// Button Auto on
DrawBut ("Auto on", X0, Y0+40, X0+170, Y0+70, colorDarkGreen, colorDarkGreen);
CursorInAutoOnBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+40 AND MouseY <= Y0+70;
AutoOnPressed = CursorInAutoOnBut AND LBClick;
if (AutoOnPressed) 
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("AutoOn",  1);
StaticVarSet ("AutoOff", 0);
StaticVarSet ("SMKT",    0); 
StaticVarSet ("BMKT",    0);
StaticVarSet ("CLPOS",   0);
StaticVarSet ("CANC",    0);
}

// Button Auto off
DrawBut ("Auto off", X0, Y0+80, X0+170, Y0+110, colorDarkRed, colorDarkRed);
CursorInAutoOffBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+80 AND MouseY <= Y0+110;
AutoOffPressed = CursorInAutoOffBut AND LBClick;
if (AutoOffPressed) 
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("AutoOn",  0); 
StaticVarSet ("AutoOff", 1);
StaticVarSet ("SMKT",    0); 
StaticVarSet ("BMKT",    0);
StaticVarSet ("CLPOS",   0);
StaticVarSet ("CANC",    0);
}

// Button Sell Market
DrawBut ("Sell Market", X0, Y0+130, X0+170, Y0+180, colorRed, colorRed);
CursorInSMKTBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+130 AND MouseY <= Y0+180;
SMKTPressed = CursorInSMKTBut AND LBClick;
if ( SMKTPressed AND StaticVarGet ("AutoOff")==1  AND StaticVarGet ("ExpOn")==1 )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("SMKT",  1);
StaticVarSet ("BMKT",  0);
StaticVarSet ("CLPOS", 0);
StaticVarSet ("CANC",  0);
}

// Button Buy Market
DrawBut ("Buy Market", X0, Y0+190, X0+170, Y0+240, colorLime, colorLime);
CursorInBMKTBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+190 AND MouseY <= Y0+240;
BMKTPressed = CursorInBMKTBut AND LBClick;
if ( BMKTPressed AND StaticVarGet ("AutoOff")==1  AND StaticVarGet ("ExpOn")==1 )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("SMKT",  0); 
StaticVarSet ("BMKT",  1);
StaticVarSet ("CLPOS", 0);
StaticVarSet ("CANC",  0);
}

// Button Close Position
DrawBut ("Close Position", X0, Y0+250, X0+170, Y0+300, colorGrey40, colorGrey40);
CursorInCloseBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+250 AND MouseY <= Y0+300;
ClosePressed = CursorInCloseBut AND LBClick;
if ( ClosePressed AND StaticVarGet ("AutoOff")==1  AND StaticVarGet ("ExpOn")==1 )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("SMKT",  0); 
StaticVarSet ("BMKT",  0);
StaticVarSet ("CLPOS", 1);
StaticVarSet ("CANC",  0);
}

// Button Cancel All Orders
DrawBut ("Cancel All Orders", X0, Y0+310, X0+170, Y0+360, colorGrey40, colorGrey40);
CursorInCancelBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+310 AND MouseY <= Y0+360;
CancelPressed = CursorInCancelBut AND LBClick;
if ( CancelPressed AND StaticVarGet ("AutoOff")==1 AND StaticVarGet ("ExpOn")==1 )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("SMKT",  0); 
StaticVarSet ("BMKT",  0);
StaticVarSet ("CLPOS", 0);
StaticVarSet ("CANC",  1);
}

// Button Export On
DrawBut ("Export On", X0, Y0+380, X0+170, Y0+410, colorDarkGreen, colorDarkGreen);
CursorInExpOnBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+380 AND MouseY <= Y0+410;
ExpOnPressed = CursorInExpOnBut AND LBClick;
if ( ExpOnPressed )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("ExpOn",  1);
StaticVarSet ("ExpOff", 0); 
}

// Button Export Off
DrawBut("Export Off", X0, Y0+420, X0+170, Y0+450, colorDarkRed, colorDarkRed);
CursorInExpOffBut = MouseX >= X0 AND MouseX <= X0+170 AND MouseY >= Y0+420 AND MouseY <= Y0+450;
ExpOffPressed = CursorInExpOffBut AND LBClick;
if ( ExpOffPressed )
{ 
StaticVarSet ("RS", 0);
StaticVarSet ("ExpOn", 0); 
StaticVarSet ("ExpOff",1);
StaticVarSet ("SMKT",  0); 
StaticVarSet ("BMKT",  0);
StaticVarSet ("CLPOS", 0);
StaticVarSet ("CANC",  0);
}

if(StaticVarGet("RS")==1)			{DrawBut("", X0+180, Y0,     X0+210, Y0+30,  colorGrey40, colorGrey40);		}// RS=1			
if(StaticVarGet("AutoOn")==1)	{DrawBut("", X0+180, Y0+40,  X0+210, Y0+70,  colorDarkGreen, colorDarkGreen);}// AutoOn		
if(StaticVarGet("AutoOff")==1)	{DrawBut("", X0+180, Y0+80,  X0+210, Y0+110, colorDarkRed, colorDarkRed);	}// AutoOff	
if(StaticVarGet("SMKT")==1)		{DrawBut("", X0+180, Y0+130, X0+210, Y0+180, colorRed, colorRed);				}// SMKT			
if(StaticVarGet("BMKT")==1)		{DrawBut("", X0+180, Y0+190, X0+210, Y0+240, colorLime, colorLime);			}// BMKT			
if(StaticVarGet("CLPOS")==1)		{DrawBut("", X0+180, Y0+250, X0+210, Y0+300, colorGrey40, colorGrey40);		}// CLPOS		
if(StaticVarGet("CANC")==1)		{DrawBut("", X0+180, Y0+310, X0+210, Y0+360, colorGrey40, colorGrey40);		}// CANC			
if(StaticVarGet("ExpOn")==1)		{DrawBut("", X0+180, Y0+380, X0+210, Y0+410, colorDarkGreen, colorDarkGreen);}// ExpOn		
if(StaticVarGet("ExpOff")==1)	{DrawBut("", X0+180, Y0+420, X0+210, Y0+450, colorDarkRed, colorDarkRed);		}// ExpOff		

_SECTION_END();

12 comments

1. BrockQAW

Button control Panel is a component of automatic or manual trading system. You can use and modify it for your need.

2. BrockQAW

This Panel can be used in auto and manual trading.

3. jayman2005

Very nice. Thank you very much !!

4. sam21

Hi BrockQAW,

Gr8 work man:)

Regards,
Sam21

5. szgolyas

how does it work?

6. BrockQAW

It is not indicator. This one is tool to make trade control signal to send it to brokers server. Based on using static variable.

7. sadhafx

how to give orders to my server account in mcx commodity?

8. BrockQAW

This one is a tool to operate START-STOP mode both auto or manual trading. You can begin or finish sending trade signal to your trading account too. Time to send trade signals to you trading account depends on income of Buy-Sell-Short-Cover etc. from your own trade system. You have to look for values of StaticVars introdused by Control Panel to place any orders to your trading account. Your orders will be received according your brocker rules.

9. bpk543

BrockQAW, How to integrate it with trading terminals. When I press Buy Market or Sell Market it doesn’t trigger the order on my Now/Nest trading terminal. Please guide on how to use it.

10. bullnbear

Can you add Magic Number so i can see the number of the trade to be external Trailing stoploss TP stoploss etc… to be external parameters too so that can help when you are not infront of the Pc very good work Thanks and how can i contact you could you provide someway to contact you Thanks

11. Dinobandhu

How it works with nest trader or now terminal

12. Dinobandhu

Require any plugin

Leave Comment

Please login here to leave a comment.

Back