[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
Trying to get this breakeven to set stop at 2 pips higher than my entry once triggered
Breakeven modifivation
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
Trying to get this breakeven to set stop at 2 pips higher than my entry once triggered
Please see post #5
viewtopic.php?f=1&t=49891
-
- Posts: 18
- Joined: Jun 06 2016
Code: Select all
[IntrabarOrderGeneration = false]
inputs: PositionBasis( false ), FloorAmt( 50 );
if PositionBasis then
SetStopPosition
else
SetStopShare ;
setbreakeven + 4 points ( FloorAmt ) ;
-
- Posts: 18
- Joined: Jun 06 2016
Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
i set breakeven to equal the entry price + 4 ticks im getting the following error message when compiling "syntax error, expecting 'bars'
line 15, column 23"
-
- Posts: 18
- Joined: Jun 06 2016
Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Go to your code...i am getting the following error message when compiling syntax error, {expecting 'bars'Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
find out the location of the problem at "line 18, column 23".
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
try this:
note the asterisk (*) between 4 and ticks.
var1= entryprice + 4 * Ticks ;
note the asterisk (*) between 4 and ticks.
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
before you go further...
look up the keyword
Ticks
look up the keyword
Ticks
setbreakeven is a predefined function. And you have var1 = setbreakeven and var1 = entryprice + 4 ticks; So you are defining var1 two times and each time they are different.Go to your code...i am getting the following error message when compiling syntax error, {expecting 'bars'Code: Select all
[IntrabarOrderGeneration = false]
inputs: FloorAmt( 1 ), AmounT(.0002), PositionBasis( false ) ;
variables: var0(0),var1(0);
var0 =marketposition;
var1= setbreakeven;
if PositionBasis then
SetStopPosition
else
SetStopShare ;
if var0 = -1 then
var1= entryprice + 4 Ticks ;
line 18, column 23}
find out the location of "line 18, column 23".
As TJ notes, you can't say 4 ticks but 4 * ticksize and you have to define ticksize as ticksize (minmove/pricescale); where you declare variables. So you have a few things going on here.