BP wrote:TheRumpledOne wrote:Posted - 01/10/2006 08:10:46
*** ATTENTION FELLOW TRADERS ***
THIS IS FOR DEMONSTRATION PURPOSES ONLY.Code: Select all
{$TRILLION}
{Programmer: Avery T. Horton, Jr. aka TheRumpledOne
*** ATTENTION FELLOW TRADERS ***
THIS IS FOR DEMONSTRATION PURPOSES ONLY.
}
Inputs:
iMaxDollarLoss(100), // IN DOLLARS
iTarget(130), // IN DOLLARS
iQuantity(1), // IN LOTS / CONTRACTS / SHARES
iActionBar(0); // BAR TO BASE ACTION ON, 0 = CURRENT BAR, 1 = 1 BAR AGO
Variables:
sLgEntryTrigger( false ), // IF TRUE BUY (LONG)
sShEntryTrigger( false ), // IF TRUE SELL (SHORT)
DayTop( 0 ), // TOP OF PREVIOUS DAY'S CANDLE BODY
DayBottom( 0 ), // BOTTOM OF PREVIOUS DAY'S CANDLE BODY
DayHigh( 0 ), // TODAY'S HIGH
DayLow( 0 ) ; // TODAY'S LOW
{*************************************************}
{ INITIALIZE }
{*************************************************}
DayHigh = HighD(0) ;
DayLow = LowD(0) ;
DayBottom = minlist(OpenD(1),CloseD(1));
DayTop = maxlist(OpenD(1),CloseD(1));
{*************************************************}
{ ENTRIES }
{*************************************************}
sLgEntryTrigger = ( close crosses above DayTop ) ; // TRUE IF TOP CROSSED
sShEntryTrigger = ( close crosses below DayBottom) ; // TRUE IF BOTTOM CROSSED
if MARKETPOSITION = 0
and sLgEntryTrigger[iActionBar]
then buy iQuantity shares this bar on close;
if MARKETPOSITION = 0
and sShEntryTrigger[iActionBar]
then sell short iQuantity shares this bar on close;
{*************************************************}
{ STOPS }
{*************************************************}
SetStopPosition ;
SetProfitTarget( iTarget ) ;
SetStopLoss( iMaxDollarLoss ) ;
SetExitOnClose;
TRO,
I am new on this forum. Is this an indicator that you have created? Can you create it for MT4? I use interbankfx. Also, I have not seen what you think of this strategy...but maybe I am just missing it.
Thanks,
BP
$Trillon is a "strategy" but I did code an indicator for it.
I do NOT program in MT4.