I need some help in creating a strategy where the PL code creates a constant trendline in the lower right corner of the chart and when I manually change the color of the Trendline to green it sends a market order for a specified number of shares. Any ideas?
Thank you
Trendline Color strategy
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Trendline Color strategy
designer01, do you have any particular difficulty while creating this strategy or you want someone to create it for you?
-
- Posts: 80
- Joined: 02 Feb 2010
Re: Trendline Color strategy
Hi Henry,
Sorry I forgot to post the PL code. My question should have been I'm trying to modify the PL code below so instead of the entry order to occur when price crosses the trendline, I wanted to have it send the order when I manually change the color of the trendline to green. Thanks
Sorry I forgot to post the PL code. My question should have been I'm trying to modify the PL code below so instead of the entry order to occur when price crosses the trendline, I wanted to have it send the order when I manually change the color of the trendline to green. Thanks
Code: Select all
[IntrabarOrderGeneration = false]
inputs:
TLRef( 1 ) ;
variables:
var0( TL_GetBeginDate( TLRef ) ),
var1( TL_GetBeginTime( TLRef ) ),
var2( false ) ;
var2 = ( Date = var0 and ( BarType = 2 or ( BarType = 1 and Time >= var1 ) ) )
or Date > var0 ;
condition1 = var2 and High < TL_GetValue( TLRef, Date, Time ) ;
if condition1 then
Buy next bar at TL_GetValue( TLRef, Date next bar, Time next bar ) stop ;
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times