Dave
22nd September 2003, 04:40 AM
What a great product!
I am very new to this software and I am trying to setup some basic strategies that look at both long and short trades. From what I read, it is possible, but my results always only show one side of the trading (either long or short), depending on which is stated first.
here is one of my explorations
------------------------------------
{Entry Exit parameters}
LongTrigger:=(Mov(C, 5,W) >= Mov(C,55,W)) and Cross(Swing(3),0);
ShortTrigger:=(Mov(C, 5,W) <= Mov(C,55,W)) and Cross(0,Swing(3));
EntryPrice:=Ref(OPEN,-1);
ExitTriggerLong:=(Mov(MACD(),9,E)>= MACD()) or (Mov(C, 5,W) <= Mov(C,55,W));
ExitTriggerShort:=(Mov(MACD(),9,E)<= MACD()) or (Mov(C, 5,W) >= Mov(C,55,W));
ExitPriceLong:=ref(open,-1);
ExitPriceShort:=ref(open,-1);
{END SETUP}
{------------------------------------}
ExtFml( "TradeSim.Initialize");
ExtFml( "TradeSim.RecordTrades",
"Strategy 01c", { Trade Data Filename }
LONG, { Trade Position Type }
LongTrigger, { Long Trigger }
EntryPrice, { Entry Price }
0, { Optional Initial Stop }
ExitTriggerLong, { Exit Trigger }
ExitPriceLong, { Exit Price }
START); { Start Symbol }
ExtFml( "TradeSim.RecordTrades",
"Strategy 01c", { Trade Data Filename }
SHORT, { Trade Position Type }
ShortTrigger, { Short Trigger }
EntryPrice, { Entry Price }
0, { No Optional Initial Stop }
ExitTriggerShort, { Exit Trigger }
ExitPriceShort, { Exit Price }
CONTINUE); { }
--------------------------------
Can anyone point out what I am doing wrong?
I am very new to this software and I am trying to setup some basic strategies that look at both long and short trades. From what I read, it is possible, but my results always only show one side of the trading (either long or short), depending on which is stated first.
here is one of my explorations
------------------------------------
{Entry Exit parameters}
LongTrigger:=(Mov(C, 5,W) >= Mov(C,55,W)) and Cross(Swing(3),0);
ShortTrigger:=(Mov(C, 5,W) <= Mov(C,55,W)) and Cross(0,Swing(3));
EntryPrice:=Ref(OPEN,-1);
ExitTriggerLong:=(Mov(MACD(),9,E)>= MACD()) or (Mov(C, 5,W) <= Mov(C,55,W));
ExitTriggerShort:=(Mov(MACD(),9,E)<= MACD()) or (Mov(C, 5,W) >= Mov(C,55,W));
ExitPriceLong:=ref(open,-1);
ExitPriceShort:=ref(open,-1);
{END SETUP}
{------------------------------------}
ExtFml( "TradeSim.Initialize");
ExtFml( "TradeSim.RecordTrades",
"Strategy 01c", { Trade Data Filename }
LONG, { Trade Position Type }
LongTrigger, { Long Trigger }
EntryPrice, { Entry Price }
0, { Optional Initial Stop }
ExitTriggerLong, { Exit Trigger }
ExitPriceLong, { Exit Price }
START); { Start Symbol }
ExtFml( "TradeSim.RecordTrades",
"Strategy 01c", { Trade Data Filename }
SHORT, { Trade Position Type }
ShortTrigger, { Short Trigger }
EntryPrice, { Entry Price }
0, { No Optional Initial Stop }
ExitTriggerShort, { Exit Trigger }
ExitPriceShort, { Exit Price }
CONTINUE); { }
--------------------------------
Can anyone point out what I am doing wrong?