发布三个经典Tradestation 交易信号模板,是samjiang 老师多年操盘经验总结,免费发布给广大汇友分享http://www.fx-smarttool.com/bbs/thread-142-1-1.html (将模板文件直接拖到TS窗口里即可使用)
Toby Crabel的當沖交易 转帖 方法: 1. 每天計算期指的高低差(最高價-最低價) 2. 假設R7=(過去七個交易日的平均高低差)*0.5 3. 當天期指突破(開盤價+R7),則買進期指 4. 當天期指跌破(開盤價-R7),則放空期指 5. 假設以期指收盤價平倉,當沖不留倉。 6. 每天只交易一次,假設每次交易成本0.03% 7. 如果前一日高低差是過去七天的最大值,則當日不交易。 TS原始碼 有興趣的自己玩 PS:程式加了停損條件.. vars:count(0); vars:hldiff1(0),hldiff2(0),hldiff3(0),hldiff4(0),hldiff5(0),hldiff6(0),hldiff7(0); vars:st(0),we(0),R7(0); hldiff1=highd(1)-lowd(1); hldiff2=highd(2)-lowd(2); hldiff3=highd(3)-lowd(3); hldiff4=highd(4)-lowd(4); hldiff5=highd(5)-lowd(5); hldiff6=highd(6)-lowd(6); hldiff7=highd(7)-lowd(7); R7=0.5*(hldiff1+hldiff2+hldiff3+hldiff4+hldiff5+hldiff6+hldiff7)/7; st=opend(0)+r7; we=opend(0)-r7; if date[0] <> date[1] then begin count = 0; end; if hldiff1>hldiff2 and hldiff1>hldiff3 and hldiff1>hldiff4 and hldiff1>hldiff5 and hldiff1>hldiff6 and hldiff1>hldiff7 then begin count = 1; end; if time >845.00 and time<1345.00 and count = 0 and marketposition=0 then begin if h[1]>st and c>st then begin buy("B") next bar at market; count=count+1; end; if l[1] < we and c < we then begin sell("S") next bar at market; count=count+1; end; end; if time >= 845.00 and time < 1340.00 and count = 1 then begin if l[1] < we and c < we and marketposition > 0 then begin exitlong("StopB") next bar at market; end; if h[1]>st and c>st and marketposition < 0 then begin exitshort("StopS") next bar at market; end; end; if marketposition > 0 and time = 1340.0 then begin exitlong("XB") next bar at market; end; if marketposition < 0 and time = 1340.00 then begin exitshort("XS") next bar at market; end;
Their eyes there is no average, no trend line, the price did not rise, not fall, not on the wave patterns, there is no K-line, dynamic no turnover with those of large positions is the so-called sneer! But they know all this technical form. They have one joke went the world, and laugh about life, the soul as pure as a child, like the broad chest, like the sea, if he knew to die tomorrow, will as usual Living Happiness. Futures on without success, not failure, but also remember that the hunters mistake Buffett么? Hong Kong still remember Soros defeat it? But who knows? Buffett's shares may be three years after the huge profits of the Hong Kong Soros defeat Hong Kong's economy has resulted in 8 years of stagnation? Transactions long way, be able to go the farthest is the winner, not an early graduation, each trading day study can be amended, which is also www.hylt.net I feel the best, but also to study a place most things. .. come on come on!
人生是一场等待。也可以说,人生是由无数次等待组成的。等待无时无处不在。 在母体内,我们等待着出生;童稚时,我们等待着长大;长大后,我们等待着爱情;成人后,我们等待着衰老;衰老时,我们等待着消亡。 世间万物,都有个等待的过程。有多少次繁花似锦,就能等来多少次落英缤纷,这花开花落,是花儿的等待;有多少次芳草萋萋,就能等来多少次枯草离离,这草青草黄,是小草的等待;有多少次朝霞清晨,就能等来多少次落日黄昏,这日升日落,是太阳的等待。 等待充满着期待,等待又隐含着无奈。等待中,我们期许渴望、激情澎湃,等待中,我们焦虑急躁、痛苦煎熬。 等待是期盼的过程。播下了种子,等待着萌芽、生长、成熟、收割。农夫春播、夏耘、秋收,等待虽然漫长,但心怀期盼与希冀。 花开花落,叶绿叶黄,飘雪的寒冬过后,必将迎来姹紫嫣红的暖春。日月匆匆,春秋代序,等待中自有悟想和收获。当然,若有难遂人愿之结局,也会令人焦躁不安,甚至是煎熬和折磨。 等待是美丽的错误。执著于爱情的尾生,在等待中丧失了性命。河水溢涨,执诺而守,抱柱而亡。深闺中的江南女子,在等待中衰老了容颜。莲花开落,马蹄得得,却是过客。山崖之上的望夫女,在等待中站成了雕塑。翘首企盼,望眼欲穿,归人难至。更甚者就美丽而又残酷了,“可怜无定河边骨,犹是深闺梦里人”。 等待是无言的结局。花谢还会再开,月缺还会再圆,这是自然的规律。可有些事情就不是这样了。相信吧!劳燕分飞后,不一定会再飞来;破镜不一定会再圆;挥手别后,情人渐远,也许永不回来。 在等待中,站成了一棵树,一半深扎泥土,一半风中轻扬。任它风霜雨雪,管它流年渐殇,我自为卿郁郁苍苍,花开花黄。 在等待中,淌成了一条河,无论冬夏,无论晨昏,滔滔汤汤,千帆渡尽,从不改变游走的方向。 在等待中,唱成了一首歌,献给秋月,献给春风,喜乐年华,淡淡哀伤,演绎生命的沧桑。 等待,给人平添许多愁。等待,让人欢喜让人忧。而我们一直在等待……
你会利用EXCEL VBA 來分析下单吗? VBA怎写??以下范例: Function判断现货开盘() Dim cf As Integer cf = 0 If Range(nowset + "!f28") = 0 Then '1=股指资料更新时间0则不是 ElseIf (Range(nowda + "!ai2") < 1000) Then '就是现货栏错误,Error ??? ' Else cf = 1 End If 判断现货开盘= cf End Function 这是很简单的BASIC语法用来判断是否在九点开盘 模组化是写程式的必要条件 Function rangcopy1(tn_from As String, tn_to As String) '简化下面的复制 Dim dtln As String dtln = Trim(Str(dln)) Range(nowda + "!" + tn_from).Select '现货估量mgt2008版 Selection.Copy Range(nowda + "!" + tn_to + dtln).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Function 上面比较难不过主要是用EXCEL本身的巨集记录功能自动写程式再经小幅修改而成的 //================================================ == Tradestation可以将交易信号传递到你的交易软件来下单 前题是你的下单机需支援DDE //================以下是EXCEL DDE所用的VBA,可以参考看看 Sub复制市场开盘后资料() Dim dtln As String dtln = Trim(Str(dln)) Call chg_sheet(homepage) If判断市场开盘() = 0 Then Else '------------------------------------------------- -------------------------------- If (Range(nowda + "!ai2") < 1000) Then '股指指数不可能小于1000点,才是开盘 ' ElseIf (Range(nowda + "!ak2") = 0) Then '预估大盘量不为0 ,才是开盘 Else '------------------------------------ Call ifcopy1("b2", "b") Call ifcopy1("c2", "c") '...可以copy很多行 ' Range(nowda + "!g" + dtln) = "=$g$3+$i" + dtln Range(nowda + "!k" + dtln) = "=$k$3+$j" + dtln Range(nowda + "!ab" + dtln) = "=$ab$2+$aa" + dtln End If '------------------------------------------------- -------------------------------- End If End Sub //===================================== Function插入首页新行(oldtime As Date, newtime As Date) Dim dtln As String Dim dtlsn As String Call rundef_tw ' Dim ii As Integer 'newtime = 800 '测试用.... Dim flag As Integer flag = 0 ii = newtime - oldtime dtln = Trim(Str(dln)) Call chg_sheet(homepage) If (ii < -5) Then '-545 ?? =早上0800 flag = 1 otime = 1 '先作预设值变更 ElseIf ii > 0 Then '到了2分钟更新时间...至少大于一分钟才会更新... If (otime > 0) Then '如果超出一分钟就先更新旧的时间表 flag = 1 otime = 1 Else '如果没到一分钟.... otime = otime + 1 flag = 0 End If End If dtlsn = dtln + ":" + dtln If (flag = 1) Then Rows(dtlsn).Select '??err Selection.Insert Shift:=xlDown End If End Function //===================== Sub记录即时强弱定时() ' '快速键: Ctrl+z ' Call chg_sheet(homepage) Dim i As Integer Dim jpn As Integer Dim auto_save_time As Integer start = Timer ' Call copy价格 ' Call更新价格 jpn = 0 auto_save_time = 0 Call清除多出的资料 For i = 0 To 6000 Step 1 '预设共5小时应该用更大一点连续2天...就应设(24+6)*60=1800以上 Call记录即时强弱 '============================================== ' If jpn >= 1Then ' 1分钟看一次价格即可 ' Call copy价格 ' Call更新价格 ' jpn = 0 ' Else ' jpn = jpn + 1 ' End If '=============================================== If auto_save_time >= 10 Then ' 10分钟自动save Call autosaves(i) auto_save_time = 1 Else auto_save_time = auto_save_time + 1 End If '=============================================== Call chg_sheet(homepage) delay (60) '60秒一次... Next i End Sub //================
60策略的概念为: 最新价>=60MA和10MA且连二红则进场买进; 最新价<=60MA和10MA且连二黑则进场卖出; if low > averagefc(close, 60) and low > averagefc(close,10) and close > open and close[1] > open[1] then begin buy ("buy1") next bar at market; end; if high < averagefc(close, 60) and high < averagefc(close,10) and close < open and close[1] < open[1] then begin sell ("Sale1") next bar at market; end; if marketposition > 0 and close < averagefc(close, 10) then begin exitlong next bar at market; end; if marketposition < 0 and close > averagefc(close, 10) then begin exitshort next bar at market; end;