Pivot Point

Posted By medebaby Thursday, September 02, 2010
Add to Favorites0
Author Message
medebaby
 Posted Thursday, September 02, 2010
Supreme Being

Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)Supreme Being - (90 reputation)

Group: Forum Members
Last Active: Saturday, July 16, 2011
Posts: 34, Visits: 192
90
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

rezist
 Posted Friday, November 26, 2010
Supreme Being

Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)Supreme Being - (193 reputation)

Group: Forum Members
Last Active: Monday, August 15, 2011
Posts: 63, Visits: 164
193
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

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top