Skip to content
Browse files

doppler effect

  • Loading branch information...
1 parent 446548e commit f05e716b55b56575906b423f7e0889ffdcb379cc @amaldini committed Apr 20, 2012
View
68 MT4CommunicationLibrary/SnowBallControlPanel.lpi
@@ -59,8 +59,8 @@
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
- <TopLine Value="188"/>
- <CursorPos X="25" Y="195"/>
+ <TopLine Value="199"/>
+ <CursorPos X="62" Y="212"/>
<UsageCount Value="72"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@@ -79,123 +79,123 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="controlpanel.pas"/>
- <Caret Line="150" Column="20" TopLine="134"/>
+ <Caret Line="235" Column="16" TopLine="207"/>
</Position1>
<Position2>
- <Filename Value="SnowBallControlPanel.lpr"/>
- <Caret Line="19" Column="1" TopLine="1"/>
+ <Filename Value="controlpanel.pas"/>
+ <Caret Line="236" Column="16" TopLine="208"/>
</Position2>
<Position3>
<Filename Value="controlpanel.pas"/>
- <Caret Line="233" Column="16" TopLine="205"/>
+ <Caret Line="237" Column="16" TopLine="209"/>
</Position3>
<Position4>
<Filename Value="controlpanel.pas"/>
- <Caret Line="234" Column="16" TopLine="206"/>
+ <Caret Line="238" Column="16" TopLine="210"/>
</Position4>
<Position5>
<Filename Value="controlpanel.pas"/>
- <Caret Line="235" Column="16" TopLine="207"/>
+ <Caret Line="245" Column="16" TopLine="217"/>
</Position5>
<Position6>
<Filename Value="controlpanel.pas"/>
- <Caret Line="236" Column="16" TopLine="208"/>
+ <Caret Line="129" Column="1" TopLine="127"/>
</Position6>
<Position7>
<Filename Value="controlpanel.pas"/>
- <Caret Line="237" Column="16" TopLine="209"/>
+ <Caret Line="52" Column="47" TopLine="36"/>
</Position7>
<Position8>
<Filename Value="controlpanel.pas"/>
- <Caret Line="238" Column="16" TopLine="210"/>
+ <Caret Line="138" Column="3" TopLine="106"/>
</Position8>
<Position9>
<Filename Value="controlpanel.pas"/>
- <Caret Line="245" Column="16" TopLine="217"/>
+ <Caret Line="133" Column="3" TopLine="122"/>
</Position9>
<Position10>
<Filename Value="controlpanel.pas"/>
- <Caret Line="129" Column="1" TopLine="127"/>
+ <Caret Line="139" Column="3" TopLine="137"/>
</Position10>
<Position11>
<Filename Value="controlpanel.pas"/>
- <Caret Line="52" Column="47" TopLine="36"/>
+ <Caret Line="145" Column="3" TopLine="143"/>
</Position11>
<Position12>
<Filename Value="controlpanel.pas"/>
- <Caret Line="138" Column="3" TopLine="106"/>
+ <Caret Line="151" Column="3" TopLine="149"/>
</Position12>
<Position13>
<Filename Value="controlpanel.pas"/>
- <Caret Line="133" Column="3" TopLine="122"/>
+ <Caret Line="139" Column="55" TopLine="113"/>
</Position13>
<Position14>
<Filename Value="controlpanel.pas"/>
- <Caret Line="139" Column="3" TopLine="137"/>
+ <Caret Line="135" Column="18" TopLine="116"/>
</Position14>
<Position15>
<Filename Value="controlpanel.pas"/>
- <Caret Line="145" Column="3" TopLine="143"/>
+ <Caret Line="115" Column="57" TopLine="88"/>
</Position15>
<Position16>
<Filename Value="controlpanel.pas"/>
- <Caret Line="151" Column="3" TopLine="149"/>
+ <Caret Line="232" Column="13" TopLine="209"/>
</Position16>
<Position17>
<Filename Value="controlpanel.pas"/>
- <Caret Line="139" Column="55" TopLine="113"/>
+ <Caret Line="207" Column="11" TopLine="191"/>
</Position17>
<Position18>
<Filename Value="controlpanel.pas"/>
- <Caret Line="135" Column="18" TopLine="116"/>
+ <Caret Line="201" Column="28" TopLine="185"/>
</Position18>
<Position19>
<Filename Value="controlpanel.pas"/>
- <Caret Line="115" Column="57" TopLine="88"/>
+ <Caret Line="203" Column="27" TopLine="190"/>
</Position19>
<Position20>
<Filename Value="controlpanel.pas"/>
- <Caret Line="232" Column="13" TopLine="209"/>
+ <Caret Line="201" Column="38" TopLine="185"/>
</Position20>
<Position21>
<Filename Value="controlpanel.pas"/>
- <Caret Line="207" Column="11" TopLine="191"/>
+ <Caret Line="194" Column="18" TopLine="185"/>
</Position21>
<Position22>
<Filename Value="controlpanel.pas"/>
- <Caret Line="201" Column="28" TopLine="185"/>
+ <Caret Line="201" Column="27" TopLine="178"/>
</Position22>
<Position23>
<Filename Value="controlpanel.pas"/>
- <Caret Line="203" Column="27" TopLine="190"/>
+ <Caret Line="203" Column="25" TopLine="187"/>
</Position23>
<Position24>
<Filename Value="controlpanel.pas"/>
- <Caret Line="201" Column="38" TopLine="185"/>
+ <Caret Line="207" Column="66" TopLine="191"/>
</Position24>
<Position25>
<Filename Value="controlpanel.pas"/>
- <Caret Line="194" Column="18" TopLine="185"/>
+ <Caret Line="199" Column="12" TopLine="183"/>
</Position25>
<Position26>
<Filename Value="controlpanel.pas"/>
- <Caret Line="201" Column="27" TopLine="178"/>
+ <Caret Line="200" Column="20" TopLine="183"/>
</Position26>
<Position27>
- <Filename Value="controlpanel.pas"/>
- <Caret Line="203" Column="25" TopLine="187"/>
+ <Filename Value="SnowBallControlPanel.lpr"/>
+ <Caret Line="19" Column="1" TopLine="1"/>
</Position27>
<Position28>
<Filename Value="controlpanel.pas"/>
- <Caret Line="207" Column="66" TopLine="191"/>
+ <Caret Line="209" Column="46" TopLine="188"/>
</Position28>
<Position29>
<Filename Value="controlpanel.pas"/>
- <Caret Line="199" Column="12" TopLine="183"/>
+ <Caret Line="208" Column="29" TopLine="193"/>
</Position29>
<Position30>
<Filename Value="controlpanel.pas"/>
- <Caret Line="200" Column="20" TopLine="183"/>
+ <Caret Line="215" Column="6" TopLine="199"/>
</Position30>
</JumpHistory>
</ProjectOptions>
View
18 MT4CommunicationLibrary/controlpanel.lfm
@@ -2,10 +2,10 @@ object Form1: TForm1
Left = 364
Height = 272
Top = 235
- Width = 456
+ Width = 582
Caption = 'SnowBall ControlPanel'
ClientHeight = 252
- ClientWidth = 456
+ ClientWidth = 582
FormStyle = fsSystemStayOnTop
Menu = MainMenu1
OnCreate = FormCreate
@@ -131,7 +131,7 @@ object Form1: TForm1
Left = 0
Height = 23
Top = 229
- Width = 456
+ Width = 582
Panels = <>
end
object Label1: TLabel
@@ -178,11 +178,19 @@ object Form1: TForm1
end
object lblProfits: TLabel
Left = 368
- Height = 131
+ Height = 191
Top = 8
- Width = 32
+ Width = 51
Caption = 'Profits'#13#10'-'#13#10'-'#13#10'-'#13#10'-'#13#10'-'#13#10'-'#13#10'-'#13#10'-'#13#10'-'
+ Font.CharSet = ANSI_CHARSET
+ Font.Color = clBlack
+ Font.Height = -16
+ Font.Name = 'Arial'
+ Font.Pitch = fpVariable
+ Font.Quality = fqDraft
+ Font.Style = [fsBold]
ParentColor = False
+ ParentFont = False
end
object Timer1: TTimer
OnTimer = Timer1Timer
View
12 MT4CommunicationLibrary/controlpanel.pas
@@ -203,9 +203,15 @@ procedure checkProfits();
for i := 0 to (Form1.listbox1.count-1) do
begin
symbol:=Form1.listbox1.items[i];
- profits1:= getProfits(PChar(symbol),0);
- profits2:= getProfits(PChar(symbol),1);
- text+=symbol+' '+FormatFloat(myFormat,profits1+profits2)+sLineBreak;
+ profits1:= getProfits(PChar(symbol),1);
+ profits2:= getProfits(PChar(symbol),0);
+ if ((profits1+profits2)<>0) then
+ begin
+ text+=symbol+' '+
+ FormatFloat(myFormat,profits1)+' '+
+ FormatFloat(myFormat,profits2)+' '+
+ FormatFloat(myFormat,profits1+profits2)+' '+sLineBreak;
+ end;
end;
Form1.lblProfits.caption := text;
end;
View
4 include/MT4Communication.mqh
@@ -171,11 +171,11 @@ void tradeGrid(int isMaster) {
if (isMaster==0) {
price = NormalizeDouble(gridStart-GRID_TRADING_STEP*i*pip,Digits);
condition1 = (price<Bid && distant[0]==0);
- condition2 = (price<(Bid-GRID_TRADING_STEP*pip) && distant[0]!=0);
+ condition2 = (price<(Bid-GRID_TRADING_STEP*pip*GRID_TRADING_PENDINGORDERS) && distant[0]!=0);
} else {
price = NormalizeDouble(gridStart+GRID_TRADING_STEP*i*pip,Digits);
condition1 = (price>Ask && distant[0]==0);
- condition2 = (price>(Ask+GRID_TRADING_STEP*pip) && distant[0]!=0);
+ condition2 = (price>(Ask+GRID_TRADING_STEP*pip*GRID_TRADING_PENDINGORDERS) && distant[0]!=0);
}
if (condition1 || condition2) {

0 comments on commit f05e716

Please sign in to comment.
Something went wrong with that request. Please try again.