Pivot Point Expand / Collapse
Author
Message
Posted 9/2/2010 4:45:30 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum 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

Post #1925
Posted 11/26/2010 9:32:08 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum 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
Post #2390
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin

All times are GMT -5:00, Time now is 8:33pm


© 2009 Actforex.com Terms of Use