|
|
|
Forum Member
      
Group: Forum Members
Last Login: 7/16/2011 9:47:02 AM
Posts: 34,
Visits: 192
|
|
| Hi, I'm testing a strategy that start from a distance of Pivot Point ( at the half or 50% ) with 1 day chart and setting for 6 days. So I'm changing everyday the price of pivot point and I modify the price to start open position. May someone help me to add the script for an automatic trading? My strategy is : const StrategyName = 'Pivot'; var History: TCandleHistory; Account: TAccount; Amount,Equitylevel:double; Point: Double; ESPrice, ELPrice: Integer; Stop, Limit: Integer; procedure OnCreate; begin AddCandleHistorySetting(@History, 'Storico Candele', 'EURUSD', CI_1_Minute, 1); History.OnNewCandleEvent := @NuovaCandela; AddAccountSetting(@Account, 'Account', ''); AddFloatSetting(@Amount, 'Lotti', 2); AddIntegerSetting(@ESPrice, 'Entry Stop Distance', 26); AddIntegerSetting(@ELPrice, 'Entry Limit Distance', 20); AddIntegerSetting(@Stop, 'Stop Loss', 400); AddIntegerSetting(@Limit, 'Margine', 8); end; procedure NuovaCandela; begin Point := History.Instrument.PointSize; if (History.Last(1).Close>1.3215)and (History.Last(1).Close<1.3235) then begin Equitylevel:= xxxxx ;EquityLevel ; if (account.EquityLevel>35000) then begin CreateOrder (History.Instrument, Account, Amount, bsSell, History.Instrument.Buy + 400*Point, History.Instrument.Buy - Point*Limit, otELimit,'EntryLimitSell'); end; end;
Thank you very much
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 8/15/2011 9:38:19 AM
Posts: 63,
Visits: 164
|
|
Hi, I don't really understand what you meant but I suppose this topic will help you http://forum.actfx.com/Topic591-14-1.aspx?Highlight=pivot+point
If you explain in more details probably I'll be able to help you
|
|
|
|