Correcting strategy model
This commit is contained in:
1 parent
3e4c6d6748
commit
7ec9ac9bde
3 files changed
+2
-21
No files matched your search
@@ -0,0 +1,174 @@
|
||||
import mongoose, { Schema } from 'mongoose';
|
||||
|
||||
const strategySchema = new Schema({
|
||||
fbId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
subStrategies: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
entryPoint: {
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
},
|
||||
exitPoint: {
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
},
|
||||
sellPoint: {
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
},
|
||||
buyPoint: {
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
},
|
||||
stopLoss: {
|
||||
phases: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
}],
|
||||
},
|
||||
buyOrder: {
|
||||
phases: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
}],
|
||||
},
|
||||
sellOrder: {
|
||||
phases: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
situations: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
conditions: [{
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: 'false',
|
||||
},
|
||||
}],
|
||||
}],
|
||||
}],
|
||||
},
|
||||
}],
|
||||
});
|
||||
|
||||
const Strategy = mongoose.model('Strategy', strategySchema);
|
||||
|
||||
export default Strategy;
|
||||
Reference in new issue
Block a user