Moving Day

Post Reply
Maximilian
Trader
Posts: 149
Joined: Sat Sep 06, 2014 2:43 pm

Moving Day

Post by Maximilian »

Thanks for your explanations @biobier @Tomele.
Greetings,
Maximilian
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Moving Day

Post by SteveHopwood »

I have added the fix that Max spotted and uploaded to post 1. Thanks Max. :clap: :clap: :clap:

DIYers, do a search for:int levels = (int) (lossPips / distanceBetweenTrades);

Replace it with:
int levels = (int) (lossPips / DistanceBetweenLevels);

Re my thingy of declaring some externals and integers and then copying the input into a double for use throughout the code, it is all to do with the confusion initially caused when the brokers added an extra digit to the quote price. Many confused pips with points.

Anything input that needs a pips entry I end with 'Pips', making it explicit so:
extern int StopLossPips = 20;
double stopLoss=0;
Then in OnInit:
stopLoss=StopLossPips;

This saves me from getting cross because I do not need to constantly reiterate the difference between pips and points.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Maximilian
Trader
Posts: 149
Joined: Sat Sep 06, 2014 2:43 pm

Moving Day

Post by Maximilian »

SteveHopwood wrote:I have added the fix that Max spotted and uploaded to post 1. Thanks Max. :clap: :clap: :clap:

DIYers, do a search for:int levels = (int) (lossPips / distanceBetweenTrades);

Replace it with:
int levels = (int) (lossPips / DistanceBetweenLevels);

Re my thingy of declaring some externals and integers and then copying the input into a double for use throughout the code, it is all to do with the confusion initially caused when the brokers added an extra digit to the quote price. Many confused pips with points.

Anything input that needs a pips entry I end with 'Pips', making it explicit so:
extern int StopLossPips = 20;
Then in OnInit:
stopLoss=StopLossPips;

This saves me from getting cross because I do not need to constantly reiterate the difference between pips and points.

:xm: :rocket:
I see. Thanks Steve.
Maximilian
Post Reply

Return to “Moving Day”