(If you already have an account, login at the top of the page)
futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.
At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors all of which you can find on futures io, utilizing our social trading environment.
With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you dont need to worry about fake reviews.
We are fundamentally different than most other trading sites:
We are here to help. Just let us know what you need.
We work extremely hard to keep things positive in our community.
We do not tolerate rude behavior, trolling, or vendors advertising in posts.
We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
We expect our members to participate and become a part of the community. Help yourself by helping others.
You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple.
I am relatively new to Tradestation and would need some help from expierenced TS programmers in understanding below attached Turtle strategy.
I am hoping that there are some members which can help me to fully understand below code.
Below is the first part of mentioned Turtle strategy attached, including my comments as I think the instrcutions will be executed, on some statements I simply have no clue what they are really doing, hopefully some members can explain them in detail.
Currently I donīt think it makes sense to post the entire strategy, so I will go ahead and post below the first part
In BLUE are my comments, as I said, would be great if somebody can tell me if my analysis of below code is correct and on sections where I simply donīt know whats going on if possible please provide some further assistance.
if Barnumber=1 then begin {Start with 1 bar on chart}
VALUE29=-1; {Numeric value set to -1, for later usage, currently donīt know the meaning of -1}
VALUE38=-1; {Numeric value set to -1, for later usage, currently donīt know the meaning of -1}
end;
cCurrentEntries=CurrentEntries; {"CurrentEntries" -->numbers of entries currentlyopen, assigned to"cCurrentEntires"}
cAvgEntryPrice=AvgEntryPrice; {AvgEntryPrice --> Average price of all currently open entries --> assigned to "cAvgEntryPrice"}
cCurrentContracts=CurrentContracts; {CurrentContracts --> Number of contracts currently open --> assigned to "cCurrentContracts"}
if (cCurrentEntries>cCurrentEntries[1]) then begin {(cCurrentEntries>cCurrentEntries[1]) --> if "cCurrentEntries" is bigger that the one from yesterday, but so far there are no trades made, value for both is still 0, condition not met, jump to next "if" --> if (cCurrentEntries=0 and cCurrentEntries[1]<>0) then begin}
cEntryPrice=(CurrentContracts*AvgEntryPrice-cCurrentContracts[1]*cAvgEntryPrice[1]) / (CurrentContracts-cCurrentContracts[1]); {Calculation for var "cEntryprice" --> (Number of currently held contracts * average price of all currently open entries) - ( values from yesterday) / (currently held contract - the ones from yesterday)}
--> same thing: currently no trades in progress, all vars still set to 0 --> What does "cEntryPrice" basically say? actually donīt understand the meaning of this calculation.
if MarketPosition=1 then begin { if long than continue --> condition not met, no trades in progress}
LExitStop=TicksRound(cEntryPrice-2*XAverage(TrueRange,20)); { I guess thatīs the "2N" initial stop calculation according to Turtle rules}
NextHigh=cEntryPrice+0.5*XAverage(TrueRange,20); {no idea...., whats the meaning of this "NextHigh"?}
NextHigh=TicksRound(NextHigh+TicksMTS(NextHigh)); {no idea...., whats the meaning of this "NextHigh"?}
BuyStop=-1; {predefined vars, as above. Whatīs the reason to have them all on -1?)
BuyLimit=-1; {predefined vars, as above)
BarUntil=-1; {predefined vars, as above)
VALUE29=-1; {predefined vars, as above)
end
else begin
SExitStop=TicksRound(cEntryPrice+2*XAverage(TrueRange,20)); {same as above, just SExit)
NextLow=cEntryPrice-0.5*XAverage(TrueRange,20); {no idea...., whats the meaning of this?}
NextLow=TicksRound(NextLow-TicksMTS(NextLow)); {no idea...., whats the meaning of this?}
SellStop=-1; {predefined vars, as above. Whatīs the reason to have them all on -1?)
SellLimit=-1; {predefined vars, as above)
BarUntil=-1; {predefined vars, as above)
VALUE38=-1; {predefined vars, as above)
end;
{ Date & Time line for multiple entries Buy / Sell }
value99=date; {predefined numeric values --> date}
value98=time; {predefined numeric value --> time}
end;
if (cCurrentEntries=0 and cCurrentEntries[1]<>0) then begin {cCurrentEntries is 0, but cCurrentEnties from yesterday is equal to 0 --> condition not met to proceed, so far no trades made}
NextHigh=-1;
NextLow=-1;
LExitStop=-1;
SExitStop=-1;
BuyStop=-1;
BuyLimit=-1;
SellStop=-1;
SellLimit=-1;
BarUntil=-1;
if VALUE29>=0 then {so far value29 is still set to 0, cannot proceed}
TL_Delete(VALUE29); {delete trendline}
VALUE29=-1; {in case value29 changed --> now re-setting "value29" to -1}
if VALUE38>=0 then {so far value38 is still set to 0, cannot proceed}
TL_Delete(VALUE38); {delete trendline}
VALUE38=-1; {in case value38 changed --> now re-setting "value38" to -1}
end;
Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.