Page 1 of 1

strategic w trend

Posted: 17 Mar 2007
by gregorio123456
Hi

Is it possible in format objects have 2 strategic .

1strategic give trend up or down
in function of 1strategic.... have 2strategic (read in 1strategic )to tigger signal to buy in trend up or sell in trend down.

or anything to be possible transfer or read value one to other


thanks

gregorio

Posted: 21 Mar 2007
by Kate
Gregorio123456,

The description is not clear enough. MultiCharts allows you to have either two signals one of which will refer to buy and the other for sell, or one signal that will have both buy and sell.

Posted: 21 Mar 2007
by gregorio123456
Gregorio123456,

The description is not clear enough. MultiCharts allows you to have either two signals one of which will refer to buy and the other for sell, or one signal that will have both buy and sell.
No

you see
Function __averagetrend1.
input: price(NumericSeries),length(NumericSimple);
if(close> Average (price,length))then __averagetrend1=1;
if(close< average (price,length))then __averagetrend1=-1;

Strategic RSI.
Input:trend(__averagetrend1(close,270));
Input: length(9),OverSold( 30 ),OverBought( 70 ) ;
variables: MyRSI( 0 ) ;
MyRSI = RSI( Close, Length ) ;
if Currentbar > 1 and trend=1 and MyRSI crosses over OverSold then buy 1 contract this bar close;
if Currentbar > 1 and trend=-1 and MyRSI crosses under OverBought then sellshort 1 contract this bar close;

I have one function give trend and strategic give trigger in trend ok

I Would like this, put in formant object
MovAvg Crooss LE (Standar signal in PL to buy)
MovAvg Crooss SE(Standar signal in PL to sell)
RSI LE (signal default in PL to buy)
RSI SE(signal default in PL to sell)
MovAvg Crooss LE and MovAvg Crooss SE give me trend instead signal buy or sell ,and transfer the information to RSI LE and RSI SE to trigger buy signal or sell sinal in the trend.


Why do I like this ? because I use your Standar signal in PL to give me trend, accord of trend use your Standar signal to trigger buy or sell signal

Thanks
gregorio

Posted: 21 Mar 2007
by Stanley Miller
In this case it makes sense convert signals into the functions and use them in the strategy. It's quite simple.

Posted: 21 Mar 2007
by gregorio123456
I have one problems w function w multi-output:

function
_trend
input:price(NumericSeries),length(NumericSimple),otrendup(TrueFalseRef),otrenddown(TrueFalseRef) ;
otrendup=(close>Average(price,length));
otrenddown=(close< Average(price,length));
_trend=true;

Strategic
Input:trend(_trend(close,270,otrendup,otrenddown));
Input: length(9),OverSold( 30 ),OverBought( 70 ) ;
variables: MyRSI( 0 ) otrendup(false),otrenddown(false);
MyRSI = RSI( Close, Length ) ;


if Currentbar > 1 and otrendup and MyRSI crosses over OverSold then buy 1 contract this bar close;
if Currentbar > 1 and otrenddown and MyRSI crosses under OverBought then sellshort 1 contract this bar close;

When I compile strategic, Pl donĀ“t accepted the function _trend in strategic

Posted: 22 Mar 2007
by Stanley Miller
You need to create 2 different functions for otrendup and otrenddown. I.e.


function _otrendup:

if close>Average(price,length) then
_otrendup = true
else
_otrendup = false;


strategy:

if Currentbar > 1 and _otrendup and MyRSI crosses over OverSold then buy 1 contract this bar close;

Posted: 22 Mar 2007
by gregorio123456
You need to create 2 different functions for otrendup and otrenddown. I.e.


function _otrendup:

if close>Average(price,length) then
_otrendup = true
else
_otrendup = false;


strategy:

if Currentbar > 1 and _otrendup and MyRSI crosses over OverSold then buy 1 contract this bar close;


thanks
grego