Patrickjokerpr
8th July 2006, 12:48 AM
Does anyone have a sample Pyramidding code that they know works that they can post?Please keep it short and sample. I think I got a bug in my software or something. I emailed Tec Support but as yet I haven't heard back from them on the matter.
I'm using-
TradeSim V4.2.2 Build 685 Standard Edition
TradeSim DLL v5.2.1.122
I was tring to encode a pyramid that would take its 0 level entry signals for both buy & sell from metastock. Then after that it would take additional level 1,2,3 from metastock also. I used a counter design from Roy Larsen that I know works but when I ran TradeSim it only took level 0 trades in the trade log. Yes I read and re-read the pdf Pyramidding and all the correct box where unchecked & checked but I still only got zero level trades.
I also wrote the sample code down from the pdf but I got the same results.
EntryTrigger:=(DayOfWeek()=1); { Initial Entry Trigger }
EntryPrice:=CLOSE;
InitialStop:=0;
ExitTrigger:=(DayOfMonth()=1); { Final Exit Trigger }
ExitPrice:=CLOSE;
dummy:=ExtFml( "TradeSim.Initialize");
dummy:=ExtFml( "TradeSim.EnableTradePyramiding",TRIGGER,0,100);
dummy:=ExtFml( "TradeSim.SetReturnInfoType",AllTriggers);
ExtFml( "TradeSim.RecordTrades",
"Pyramid Trade example 1", { Trade Data Filename }
LONG, { Trade Position Type }
EntryTrigger, { Entry Trigger }
EntryPrice, { Entry Price }
InitialStop, { Optional Initial Stop }
ExitTrigger, { Exit Trigger }
ExitPrice, { Exit Price }
START); { Start Symbol }
I got confused in the coding with the varible "dummy" as it was never called on. I removed it and ran an exploration but I still got nothing pyramiddong.
ExtFml( "TradeSim.Initialize");
ExtFml( "TradeSim.EnableTradePyramiding",TRIGGER,0,100);
ExtFml( "TradeSim.SetReturnInfoType",AllTriggers);
Thanks for any help here.
I'm using-
TradeSim V4.2.2 Build 685 Standard Edition
TradeSim DLL v5.2.1.122
I was tring to encode a pyramid that would take its 0 level entry signals for both buy & sell from metastock. Then after that it would take additional level 1,2,3 from metastock also. I used a counter design from Roy Larsen that I know works but when I ran TradeSim it only took level 0 trades in the trade log. Yes I read and re-read the pdf Pyramidding and all the correct box where unchecked & checked but I still only got zero level trades.
I also wrote the sample code down from the pdf but I got the same results.
EntryTrigger:=(DayOfWeek()=1); { Initial Entry Trigger }
EntryPrice:=CLOSE;
InitialStop:=0;
ExitTrigger:=(DayOfMonth()=1); { Final Exit Trigger }
ExitPrice:=CLOSE;
dummy:=ExtFml( "TradeSim.Initialize");
dummy:=ExtFml( "TradeSim.EnableTradePyramiding",TRIGGER,0,100);
dummy:=ExtFml( "TradeSim.SetReturnInfoType",AllTriggers);
ExtFml( "TradeSim.RecordTrades",
"Pyramid Trade example 1", { Trade Data Filename }
LONG, { Trade Position Type }
EntryTrigger, { Entry Trigger }
EntryPrice, { Entry Price }
InitialStop, { Optional Initial Stop }
ExitTrigger, { Exit Trigger }
ExitPrice, { Exit Price }
START); { Start Symbol }
I got confused in the coding with the varible "dummy" as it was never called on. I removed it and ran an exploration but I still got nothing pyramiddong.
ExtFml( "TradeSim.Initialize");
ExtFml( "TradeSim.EnableTradePyramiding",TRIGGER,0,100);
ExtFml( "TradeSim.SetReturnInfoType",AllTriggers);
Thanks for any help here.